From acee61eaf2ca931206a70486d0c741b58d7de64e Mon Sep 17 00:00:00 2001 From: Kharec Date: Wed, 5 Aug 2026 13:15:06 +0200 Subject: [PATCH] fix: remove atoi redundancy --- main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index 4ec8912..413aee1 100644 --- a/main.c +++ b/main.c @@ -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; } }