Patch from Denis Vlasenko turning static const int (which gets emitted into
[oweals/busybox.git] / networking / nc.c
index bf155b3b13bb3148dd3fc11d94c4dac2cbb1c489..85148c4a713be973ae535e64af84c5c7dcfc6578 100644 (file)
@@ -48,7 +48,9 @@ static void timeout(int signum)
 int nc_main(int argc, char **argv)
 {
        int do_listen = 0, lport = 0, delay = 0, wsecs = 0, tmpfd, opt, sfd, x;
-       char buf[BUFSIZ];
+
+#define buf bb_common_bufsiz1
+
 #ifdef CONFIG_NC_GAPING_SECURITY_HOLE
        char *pr00gie = NULL;
 #endif
@@ -82,13 +84,6 @@ int nc_main(int argc, char **argv)
                }
        }
 
-#ifdef CONFIG_NC_GAPING_SECURITY_HOLE
-       if (pr00gie) {
-               /* won't need stdin */
-               close(STDIN_FILENO);      
-       }
-#endif /* CONFIG_NC_GAPING_SECURITY_HOLE */
-
        if ((do_listen && optind != argc) || (!do_listen && optind + 2 != argc))
                bb_show_usage();