Use chomp to remove newlines
No binary (build failed)
—
(log yok)
| @@ -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'); | |
| @@ -204,7 +204,7 @@ int lpd_main(int argc UNUSED_PARAM, char *argv[]) | |
| goto err_exit; | |
| } | |
| // get filename | |
| - | *strchrnul(s, '\n') = '\0'; |
| + | chomp(s); |
| fname = strchr(s, ' '); | |
| if (!fname) { | |
| // bad_fname: | |
| @@ -360,7 +360,7 @@ static void process_irq_counts(void) | |
| } | |
| name = p; | |
| - | strchrnul(name, '\n')[0] = '\0'; |
| + | chomp(p); |
| /* Save description of the interrupt */ | |
| if (nr >= 20000) | |
| sprintf(irq_desc, " <kernel IPI> : %s", name); | |
| @@ -470,7 +470,7 @@ static NOINLINE int process_timer_stats(void) | |
| process = idx < 2 ? "[kernel module]" : "<kernel core>"; | |
| } | |
| - | strchrnul(p, '\n')[0] = '\0'; |
| + | chomp(p); |
| // 46D\01136\0kondemand/1\0do_dbs_timer (delayed_work_timer_fn) | |
| // ^ ^ ^ | |
| @@ -69,7 +69,7 @@ static void show_clock(const char **pp_rtcname, int utc) | |
| strftime(cp, sizeof(cp), "%c", ptm); | |
| #else | |
| char *cp = ctime(&t); | |
| - | strchrnul(cp, '\n')[0] = '\0'; |
| + | chomp(cp); |
| #endif | |
| #if !SHOW_HWCLOCK_DIFF | |