fix: remove atoi redundancy
This commit is contained in:
1 parent
ad79702ade
commit
acee61eaf2
1 file changed
+2
-2
@@ -30,7 +30,7 @@ int *get_running_processes(int *count) {
|
||||
continue;
|
||||
}
|
||||
|
||||
strtol(entry->d_name, &endptr, 10);
|
||||
long pid = strtol(entry->d_name, &endptr, 10);
|
||||
if (*endptr != '\0') {
|
||||
continue;
|
||||
}
|
||||
@@ -47,7 +47,7 @@ int *get_running_processes(int *count) {
|
||||
}
|
||||
processes = grown;
|
||||
}
|
||||
processes[(*count)++] = atoi(entry->d_name);
|
||||
processes[(*count)++] = (int)pid;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user