From 8ec1ff350c28ae691ee80a001c7786f4ad8abe47 Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Thu, 12 Mar 2015 20:18:51 +0100 Subject: Use chomp to remove newlines function old new delta unix_do_one 548 540 -8 process_timer_stats 508 500 -8 process_irq_counts 532 524 -8 lpd_main 839 831 -8 hwclock_main 502 494 -8 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/6 up/down: 0/-50) Total: -40 bytes Signed-off-by: Ron Yorston Signed-off-by: Denys Vlasenko --- networking/netstat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'networking/netstat.c') 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) /* TODO: currently we stop at first NUL byte. Is it a problem? */ line += path_ofs; - *strchrnul(line, '\n') = '\0'; + chomp(line); while (*line) fputc_printable(*line++, stdout); bb_putchar('\n'); -- cgit v1.2.3