diff options
Diffstat (limited to 'procps')
-rw-r--r-- | procps/mpstat.c | 2 | ||||
-rw-r--r-- | procps/powertop.c | 4 | ||||
-rw-r--r-- | procps/pwdx.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/procps/mpstat.c b/procps/mpstat.c index af3263d67..6028903fa 100644 --- a/procps/mpstat.c +++ b/procps/mpstat.c @@ -526,7 +526,7 @@ static void get_irqs_from_stat(struct stats_irq *irq) while (fgets(buf, sizeof(buf), fp)) { //bb_error_msg("/proc/stat:'%s'", buf); - if (strncmp(buf, "intr ", 5) == 0) { + if (is_prefixed_with(buf, "intr ")) { /* Read total number of IRQs since system boot */ sscanf(buf + 5, "%"FMT_DATA"u", &irq->irq_nr); } diff --git a/procps/powertop.c b/procps/powertop.c index ddda5bd93..18affacdd 100644 --- a/procps/powertop.c +++ b/procps/powertop.c @@ -458,9 +458,9 @@ static NOINLINE int process_timer_stats(void) // func = "Load balancing tick"; //} - if (strncmp(func, "tick_nohz_", 10) == 0) + if (is_prefixed_with(func, "tick_nohz_")) continue; - if (strncmp(func, "tick_setup_sched_timer", 20) == 0) + if (is_prefixed_with(func, "tick_setup_sched_timer")) continue; //if (strcmp(process, "powertop") == 0) // continue; diff --git a/procps/pwdx.c b/procps/pwdx.c index 22b892275..4e34149ed 100644 --- a/procps/pwdx.c +++ b/procps/pwdx.c @@ -41,7 +41,7 @@ int pwdx_main(int argc UNUSED_PARAM, char **argv) // Allowed on the command line: // /proc/NUM // NUM - if (strncmp(arg, "/proc/", 6) == 0) + if (is_prefixed_with(arg, "/proc/")) arg += 6; pid = bb_strtou(arg, NULL, 10); |