udhcp: do not setlinebuf(stdout), we don't print to stdout anymore
authorDenys Vlasenko <vda.linux@googlemail.com>
Wed, 7 Feb 2018 15:32:30 +0000 (16:32 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Wed, 7 Feb 2018 15:32:30 +0000 (16:32 +0100)
Since bb_info_msg() was eliminated type of buffering on stdout is not important

function                                             old     new   delta
udhcpd_main                                         1463    1451     -12
udhcpc_main                                         2735    2723     -12
setlinebuf                                            19       -     -19
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 0/2 up/down: 0/-43)             Total: -43 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
networking/udhcp/d6_dhcpc.c
networking/udhcp/dhcpc.c
networking/udhcp/dhcpd.c

index 07a8b11c1575106e33ff720be5a1f1a9a8490a42..35c99e89c5d84a725253ea8fb14540ffcdb8b989 100644 (file)
@@ -1201,8 +1201,6 @@ int udhcpc6_main(int argc UNUSED_PARAM, char **argv)
 
        /* Make sure fd 0,1,2 are open */
        bb_sanitize_stdio();
-       /* Equivalent of doing a fflush after every \n */
-       setlinebuf(stdout);
        /* Create pidfile */
        write_pidfile(client_config.pidfile);
        /* Goes to stdout (unless NOMMU) and possibly syslog */
index 385fc499859056b263eaf43ceb09de3e14bd77e1..35694fbe332adccabc3b5925d66ff9f080de34a1 100644 (file)
@@ -1386,8 +1386,6 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
 
        /* Make sure fd 0,1,2 are open */
        bb_sanitize_stdio();
-       /* Equivalent of doing a fflush after every \n */
-       setlinebuf(stdout);
        /* Create pidfile */
        write_pidfile(client_config.pidfile);
        /* Goes to stdout (unless NOMMU) and possibly syslog */
index ff74507398c7e44b69280ea415de0a69b5c199c5..093239536d7ffb877df26de4d2558ba20dcba20c 100644 (file)
@@ -856,8 +856,6 @@ int udhcpd_main(int argc UNUSED_PARAM, char **argv)
 
        /* Make sure fd 0,1,2 are open */
        bb_sanitize_stdio();
-       /* Equivalent of doing a fflush after every \n */
-       setlinebuf(stdout);
 
        /* Create pidfile */
        write_pidfile(server_config.pidfile);