libbb: xfunc_error_retval can be a byte
authorDenys Vlasenko <dvlasenk@redhat.com>
Wed, 1 Sep 2010 14:04:24 +0000 (16:04 +0200)
committerDenys Vlasenko <dvlasenk@redhat.com>
Wed, 1 Sep 2010 14:04:24 +0000 (16:04 +0200)
function                                             old     new   delta
xfunc_die                                             55      60      +5
log_and_exit                                          43      45      +2
hush_main                                            961     963      +2
xfunc_error_retval                                     4       1      -3
tty_main                                              87      84      -3
sv_main                                             1183    1180      -3
sort_main                                            804     801      -3
run_applet_no_and_exit                               440     437      -3
puts_maybe_newline                                   198     195      -3
nohup_main                                           228     225      -3
httpd_main                                           753     750      -3
get_header_tar                                      1496    1493      -3
fsck_minix_main                                     2972    2969      -3
expr_main                                            110     107      -3
cmp_main                                             641     638      -3
chat_main                                           1359    1356      -3
builtin_exit                                          48      45      -3
arping_main                                         1587    1584      -3
BB_EXECVP_or_die                                      47      44      -3
send_cgi_and_exit                                    901     895      -6
diff_main                                           1197    1191      -6
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/18 up/down: 9/-60)            Total: -51 bytes

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
include/libbb.h
libbb/default_error_retval.c

index 4b69c855f68e45836c210088b6f29a46b7b85f12..d5580b4b07fd497a59d6a59b603a37d786bb051e 100644 (file)
@@ -881,9 +881,9 @@ int spawn_and_wait(char **argv) FAST_FUNC;
 struct nofork_save_area {
        jmp_buf die_jmp;
        const char *applet_name;
-       int xfunc_error_retval;
        uint32_t option_mask32;
        int die_sleep;
+       uint8_t xfunc_error_retval;
        smallint saved;
 };
 void save_nofork_data(struct nofork_save_area *save) FAST_FUNC;
@@ -994,7 +994,7 @@ enum {
 extern const char *msg_eol;
 extern smallint logmode;
 extern int die_sleep;
-extern int xfunc_error_retval;
+extern uint8_t xfunc_error_retval;
 extern jmp_buf die_jmp;
 extern void xfunc_die(void) NORETURN FAST_FUNC;
 extern void bb_show_usage(void) NORETURN FAST_FUNC;
index 4da5b3efbed77d69704ab5632f0437ecbf728096..4f6395fa20000406cee9bc3afedd9c8d9edbe8ab 100644 (file)
@@ -15,4 +15,4 @@
 
 #include "libbb.h"
 
-int xfunc_error_retval = EXIT_FAILURE;
+uint8_t xfunc_error_retval = EXIT_FAILURE;