diff options
-rw-r--r-- | coreutils/env.c | 2 | ||||
-rw-r--r-- | coreutils/nice.c | 2 | ||||
-rw-r--r-- | coreutils/readlink.c | 2 | ||||
-rw-r--r-- | coreutils/shuf.c | 2 | ||||
-rw-r--r-- | coreutils/sort.c | 2 | ||||
-rw-r--r-- | coreutils/uname.c | 2 | ||||
-rw-r--r-- | coreutils/uniq.c | 2 | ||||
-rw-r--r-- | coreutils/uudecode.c | 2 | ||||
-rw-r--r-- | coreutils/uuencode.c | 2 | ||||
-rw-r--r-- | include/libbb.h | 1 | ||||
-rw-r--r-- | libbb/fflush_stdout_and_exit.c | 5 | ||||
-rw-r--r-- | loginutils/vlock.c | 2 | ||||
-rw-r--r-- | networking/route.c | 2 | ||||
-rw-r--r-- | sysklogd/logread.c | 2 | ||||
-rw-r--r-- | util-linux/cal.c | 2 | ||||
-rw-r--r-- | util-linux/chrt.c | 2 | ||||
-rw-r--r-- | util-linux/hexdump_xxd.c | 2 | ||||
-rw-r--r-- | util-linux/ipcs.c | 8 | ||||
-rw-r--r-- | util-linux/last.c | 2 | ||||
-rw-r--r-- | util-linux/last_fancy.c | 2 |
20 files changed, 27 insertions, 21 deletions
diff --git a/coreutils/env.c b/coreutils/env.c index a0ea4dd..6eafd06 100644 --- a/coreutils/env.c +++ b/coreutils/env.c @@ -100,7 +100,7 @@ int env_main(int argc UNUSED_PARAM, char **argv) } } - fflush_stdout_and_exit(EXIT_SUCCESS); + fflush_stdout_and_exit_SUCCESS(); } /* diff --git a/coreutils/nice.c b/coreutils/nice.c index 28591ac..e70da5d 100644 --- a/coreutils/nice.c +++ b/coreutils/nice.c @@ -33,7 +33,7 @@ int nice_main(int argc UNUSED_PARAM, char **argv) if (!*++argv) { /* No args, so (GNU) output current nice value. */ printf("%d\n", old_priority); - fflush_stdout_and_exit(EXIT_SUCCESS); + fflush_stdout_and_exit_SUCCESS(); } adjustment = 10; /* Set default adjustment. */ diff --git a/coreutils/readlink.c b/coreutils/readlink.c index 09d69df..b2e8678 100644 --- a/coreutils/readlink.c +++ b/coreutils/readlink.c @@ -96,5 +96,5 @@ int readlink_main(int argc UNUSED_PARAM, char **argv) printf((opt & 2) ? "%s" : "%s\n", buf); free(buf); - fflush_stdout_and_exit(EXIT_SUCCESS); + fflush_stdout_and_exit_SUCCESS(); } diff --git a/coreutils/shuf.c b/coreutils/shuf.c index 3def3d8..337366b 100644 --- a/coreutils/shuf.c +++ b/coreutils/shuf.c @@ -171,5 +171,5 @@ int shuf_main(int argc, char **argv) printf("%s%c", lines[i], eol); } - fflush_stdout_and_exit(EXIT_SUCCESS); + fflush_stdout_and_exit_SUCCESS(); } diff --git a/coreutils/sort.c b/coreutils/sort.c index 32a06e4..0cbb6f5 100644 --- a/coreutils/sort.c +++ b/coreutils/sort.c @@ -644,5 +644,5 @@ int sort_main(int argc UNUSED_PARAM, char **argv) printf("%s%c", lines[i], ch); } - fflush_stdout_and_exit(EXIT_SUCCESS); + fflush_stdout_and_exit_SUCCESS(); } diff --git a/coreutils/uname.c b/coreutils/uname.c index da785ab..6c0bdf0 100644 --- a/coreutils/uname.c +++ b/coreutils/uname.c @@ -209,5 +209,5 @@ int uname_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) #endif } - fflush_stdout_and_exit(EXIT_SUCCESS); /* coreutils-6.9 compat */ + fflush_stdout_and_exit_SUCCESS(); /* coreutils-6.9 compat */ } diff --git a/coreutils/uniq.c b/coreutils/uniq.c index a3058ac..06c57f7 100644 --- a/coreutils/uniq.c +++ b/coreutils/uniq.c @@ -139,5 +139,5 @@ int uniq_main(int argc UNUSED_PARAM, char **argv) die_if_ferror(stdin, input_filename); - fflush_stdout_and_exit(EXIT_SUCCESS); + fflush_stdout_and_exit_SUCCESS(); } diff --git a/coreutils/uudecode.c b/coreutils/uudecode.c index e90902f..63a8d4d 100644 --- a/coreutils/uudecode.c +++ b/coreutils/uudecode.c @@ -352,7 +352,7 @@ int baseNUM_main(int argc UNUSED_PARAM, char **argv) #undef src_buf } - fflush_stdout_and_exit(EXIT_SUCCESS); + fflush_stdout_and_exit_SUCCESS(); } #endif diff --git a/coreutils/uuencode.c b/coreutils/uuencode.c index db49ec8..f096e31 100644 --- a/coreutils/uuencode.c +++ b/coreutils/uuencode.c @@ -78,5 +78,5 @@ int uuencode_main(int argc UNUSED_PARAM, char **argv) } printf(tbl == bb_uuenc_tbl_std ? "\n`\nend\n" : "\n====\n"); - fflush_stdout_and_exit(EXIT_SUCCESS); + fflush_stdout_and_exit_SUCCESS(); } diff --git a/include/libbb.h b/include/libbb.h index a487828..8308d62 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -1054,6 +1054,7 @@ void die_if_ferror(FILE *file, const char *msg) FAST_FUNC; void die_if_ferror_stdout(void) FAST_FUNC; int fflush_all(void) FAST_FUNC; void fflush_stdout_and_exit(int retval) NORETURN FAST_FUNC; +void fflush_stdout_and_exit_SUCCESS(void) NORETURN FAST_FUNC; int fclose_if_not_stdin(FILE *file) FAST_FUNC; FILE* xfopen(const char *filename, const char *mode) FAST_FUNC; /* Prints warning to stderr and returns NULL on failure: */ diff --git a/libbb/fflush_stdout_and_exit.c b/libbb/fflush_stdout_and_exit.c index 5df7417..5a13ebc 100644 --- a/libbb/fflush_stdout_and_exit.c +++ b/libbb/fflush_stdout_and_exit.c @@ -20,3 +20,8 @@ void FAST_FUNC fflush_stdout_and_exit(int retval) * but use xfunc_die() */ xfunc_die(); } + +void FAST_FUNC fflush_stdout_and_exit_SUCCESS(void) +{ + fflush_stdout_and_exit(EXIT_SUCCESS); +} diff --git a/loginutils/vlock.c b/loginutils/vlock.c index 334b7d2..720835c 100644 --- a/loginutils/vlock.c +++ b/loginutils/vlock.c @@ -128,5 +128,5 @@ int vlock_main(int argc UNUSED_PARAM, char **argv) ioctl(STDIN_FILENO, VT_SETMODE, &ovtm); #endif tcsetattr_stdin_TCSANOW(&oterm); - fflush_stdout_and_exit(EXIT_SUCCESS); + fflush_stdout_and_exit_SUCCESS(); } diff --git a/networking/route.c b/networking/route.c index ff5daa8..26146f8 100644 --- a/networking/route.c +++ b/networking/route.c @@ -702,7 +702,7 @@ int route_main(int argc UNUSED_PARAM, char **argv) #endif bb_displayroutes(noresolve, opt & ROUTE_OPT_e); - fflush_stdout_and_exit(EXIT_SUCCESS); + fflush_stdout_and_exit_SUCCESS(); } /* Check verb. At the moment, must be add, del, or delete. */ diff --git a/sysklogd/logread.c b/sysklogd/logread.c index d5f8ca0..e6cfcf4 100644 --- a/sysklogd/logread.c +++ b/sysklogd/logread.c @@ -226,5 +226,5 @@ int logread_main(int argc UNUSED_PARAM, char **argv) /* shmdt(shbuf); - on Linux, shmdt is not mandatory on exit */ - fflush_stdout_and_exit(EXIT_SUCCESS); + fflush_stdout_and_exit_SUCCESS(); } diff --git a/util-linux/cal.c b/util-linux/cal.c index 6ba6ebf..522ab34 100644 --- a/util-linux/cal.c +++ b/util-linux/cal.c @@ -233,7 +233,7 @@ int cal_main(int argc UNUSED_PARAM, char **argv) } } - fflush_stdout_and_exit(EXIT_SUCCESS); + fflush_stdout_and_exit_SUCCESS(); } /* diff --git a/util-linux/chrt.c b/util-linux/chrt.c index 6799abb..be96fa4 100644 --- a/util-linux/chrt.c +++ b/util-linux/chrt.c @@ -110,7 +110,7 @@ int chrt_main(int argc UNUSED_PARAM, char **argv) show_min_max(SCHED_RR); show_min_max(SCHED_BATCH); show_min_max(SCHED_IDLE); - fflush_stdout_and_exit(EXIT_SUCCESS); + fflush_stdout_and_exit_SUCCESS(); } //if (opt & OPT_r) // policy = SCHED_RR; - default, already set diff --git a/util-linux/hexdump_xxd.c b/util-linux/hexdump_xxd.c index 76dada9..4372ac7 100644 --- a/util-linux/hexdump_xxd.c +++ b/util-linux/hexdump_xxd.c @@ -150,7 +150,7 @@ static void reverse(unsigned opt, const char *filename) free(buf); } //fclose(fp); - fflush_stdout_and_exit(EXIT_SUCCESS); + fflush_stdout_and_exit_SUCCESS(); } static void print_C_style(const char *p, const char *hdr) diff --git a/util-linux/ipcs.c b/util-linux/ipcs.c index ef2529c..5973cbf 100644 --- a/util-linux/ipcs.c +++ b/util-linux/ipcs.c @@ -600,15 +600,15 @@ int ipcs_main(int argc UNUSED_PARAM, char **argv) id = xatoi(opt_i); if (opt & flag_shm) { print_shm(id); - fflush_stdout_and_exit(EXIT_SUCCESS); + fflush_stdout_and_exit_SUCCESS(); } if (opt & flag_sem) { print_sem(id); - fflush_stdout_and_exit(EXIT_SUCCESS); + fflush_stdout_and_exit_SUCCESS(); } if (opt & flag_msg) { print_msg(id); - fflush_stdout_and_exit(EXIT_SUCCESS); + fflush_stdout_and_exit_SUCCESS(); } bb_show_usage(); } @@ -633,5 +633,5 @@ int ipcs_main(int argc UNUSED_PARAM, char **argv) do_sem(format); bb_putchar('\n'); } - fflush_stdout_and_exit(EXIT_SUCCESS); + fflush_stdout_and_exit_SUCCESS(); } diff --git a/util-linux/last.c b/util-linux/last.c index 24ce7a8..63751ca 100644 --- a/util-linux/last.c +++ b/util-linux/last.c @@ -162,5 +162,5 @@ int last_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) xlseek(file, pos, SEEK_SET); } - fflush_stdout_and_exit(EXIT_SUCCESS); + fflush_stdout_and_exit_SUCCESS(); } diff --git a/util-linux/last_fancy.c b/util-linux/last_fancy.c index e56e0ba..6482362 100644 --- a/util-linux/last_fancy.c +++ b/util-linux/last_fancy.c @@ -296,5 +296,5 @@ int last_main(int argc UNUSED_PARAM, char **argv) if (ENABLE_FEATURE_CLEAN_UP) close(file); - fflush_stdout_and_exit(EXIT_SUCCESS); + fflush_stdout_and_exit_SUCCESS(); } |