aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--networking/netstat.c2
-rw-r--r--printutils/lpd.c2
-rw-r--r--procps/powertop.c4
-rw-r--r--util-linux/hwclock.c2
4 files changed, 5 insertions, 5 deletions
diff --git a/networking/netstat.c b/networking/netstat.c
index 02f4cc7cc..1303d3f3d 100644
--- a/networking/netstat.c
+++ b/networking/netstat.c
@@ -622,7 +622,7 @@ static int FAST_FUNC unix_do_one(char *line)
622 622
623 /* TODO: currently we stop at first NUL byte. Is it a problem? */ 623 /* TODO: currently we stop at first NUL byte. Is it a problem? */
624 line += path_ofs; 624 line += path_ofs;
625 *strchrnul(line, '\n') = '\0'; 625 chomp(line);
626 while (*line) 626 while (*line)
627 fputc_printable(*line++, stdout); 627 fputc_printable(*line++, stdout);
628 bb_putchar('\n'); 628 bb_putchar('\n');
diff --git a/printutils/lpd.c b/printutils/lpd.c
index 642e8a89e..eaf42c08b 100644
--- a/printutils/lpd.c
+++ b/printutils/lpd.c
@@ -204,7 +204,7 @@ int lpd_main(int argc UNUSED_PARAM, char *argv[])
204 goto err_exit; 204 goto err_exit;
205 } 205 }
206 // get filename 206 // get filename
207 *strchrnul(s, '\n') = '\0'; 207 chomp(s);
208 fname = strchr(s, ' '); 208 fname = strchr(s, ' ');
209 if (!fname) { 209 if (!fname) {
210// bad_fname: 210// bad_fname:
diff --git a/procps/powertop.c b/procps/powertop.c
index 18affacdd..1de5d329e 100644
--- a/procps/powertop.c
+++ b/procps/powertop.c
@@ -360,7 +360,7 @@ static void process_irq_counts(void)
360 } 360 }
361 361
362 name = p; 362 name = p;
363 strchrnul(name, '\n')[0] = '\0'; 363 chomp(p);
364 /* Save description of the interrupt */ 364 /* Save description of the interrupt */
365 if (nr >= 20000) 365 if (nr >= 20000)
366 sprintf(irq_desc, " <kernel IPI> : %s", name); 366 sprintf(irq_desc, " <kernel IPI> : %s", name);
@@ -470,7 +470,7 @@ static NOINLINE int process_timer_stats(void)
470 process = idx < 2 ? "[kernel module]" : "<kernel core>"; 470 process = idx < 2 ? "[kernel module]" : "<kernel core>";
471 } 471 }
472 472
473 strchrnul(p, '\n')[0] = '\0'; 473 chomp(p);
474 474
475 // 46D\01136\0kondemand/1\0do_dbs_timer (delayed_work_timer_fn) 475 // 46D\01136\0kondemand/1\0do_dbs_timer (delayed_work_timer_fn)
476 // ^ ^ ^ 476 // ^ ^ ^
diff --git a/util-linux/hwclock.c b/util-linux/hwclock.c
index 3f531555b..6c99977cf 100644
--- a/util-linux/hwclock.c
+++ b/util-linux/hwclock.c
@@ -69,7 +69,7 @@ static void show_clock(const char **pp_rtcname, int utc)
69 strftime(cp, sizeof(cp), "%c", ptm); 69 strftime(cp, sizeof(cp), "%c", ptm);
70#else 70#else
71 char *cp = ctime(&t); 71 char *cp = ctime(&t);
72 strchrnul(cp, '\n')[0] = '\0'; 72 chomp(cp);
73#endif 73#endif
74 74
75#if !SHOW_HWCLOCK_DIFF 75#if !SHOW_HWCLOCK_DIFF