mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-10-15 13:20:16 +00:00
Use our own function to parse int
This commit is contained in:
@@ -38,21 +38,6 @@ void clean_magisk_props();
|
||||
void crawl_procfs(const std::function<bool (int)> &fn);
|
||||
bool proc_name_match(int pid, const char *name);
|
||||
|
||||
/*
|
||||
* Bionic's atoi runs through strtol().
|
||||
* Use our own implementation for faster conversion.
|
||||
*/
|
||||
static inline int parse_int(const char *s) {
|
||||
int val = 0;
|
||||
char c;
|
||||
while ((c = *(s++))) {
|
||||
if (c > '9' || c < '0')
|
||||
return -1;
|
||||
val = val * 10 + c - '0';
|
||||
}
|
||||
return val;
|
||||
}
|
||||
|
||||
extern pthread_t proc_monitor_thread;
|
||||
extern bool hide_enabled;
|
||||
extern pthread_mutex_t monitor_lock;
|
||||
|
Reference in New Issue
Block a user