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) | |||
526 | 526 | ||
527 | while (fgets(buf, sizeof(buf), fp)) { | 527 | while (fgets(buf, sizeof(buf), fp)) { |
528 | //bb_error_msg("/proc/stat:'%s'", buf); | 528 | //bb_error_msg("/proc/stat:'%s'", buf); |
529 | if (strncmp(buf, "intr ", 5) == 0) { | 529 | if (is_prefixed_with(buf, "intr ")) { |
530 | /* Read total number of IRQs since system boot */ | 530 | /* Read total number of IRQs since system boot */ |
531 | sscanf(buf + 5, "%"FMT_DATA"u", &irq->irq_nr); | 531 | sscanf(buf + 5, "%"FMT_DATA"u", &irq->irq_nr); |
532 | } | 532 | } |
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) | |||
458 | // func = "Load balancing tick"; | 458 | // func = "Load balancing tick"; |
459 | //} | 459 | //} |
460 | 460 | ||
461 | if (strncmp(func, "tick_nohz_", 10) == 0) | 461 | if (is_prefixed_with(func, "tick_nohz_")) |
462 | continue; | 462 | continue; |
463 | if (strncmp(func, "tick_setup_sched_timer", 20) == 0) | 463 | if (is_prefixed_with(func, "tick_setup_sched_timer")) |
464 | continue; | 464 | continue; |
465 | //if (strcmp(process, "powertop") == 0) | 465 | //if (strcmp(process, "powertop") == 0) |
466 | // continue; | 466 | // 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) | |||
41 | // Allowed on the command line: | 41 | // Allowed on the command line: |
42 | // /proc/NUM | 42 | // /proc/NUM |
43 | // NUM | 43 | // NUM |
44 | if (strncmp(arg, "/proc/", 6) == 0) | 44 | if (is_prefixed_with(arg, "/proc/")) |
45 | arg += 6; | 45 | arg += 6; |
46 | 46 | ||
47 | pid = bb_strtou(arg, NULL, 10); | 47 | pid = bb_strtou(arg, NULL, 10); |