diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-01-20 16:54:19 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-01-20 16:54:19 +0000 |
commit | 316355524f5fa14f18395c06d4dc813ffa97d47b (patch) | |
tree | d6fbd44c510bef0ebf57cd81bee8e009040fa3f4 | |
parent | 91f20ab510a6ddab49dd89f8c8876912d4537be0 (diff) | |
download | busybox-w32-316355524f5fa14f18395c06d4dc813ffa97d47b.tar.gz busybox-w32-316355524f5fa14f18395c06d4dc813ffa97d47b.tar.bz2 busybox-w32-316355524f5fa14f18395c06d4dc813ffa97d47b.zip |
fixing bugs revealed by randomconfig runs
-rw-r--r-- | include/applets.h | 2 | ||||
-rw-r--r-- | networking/nc.c | 2 | ||||
-rw-r--r-- | networking/tftp.c | 8 |
3 files changed, 9 insertions, 3 deletions
diff --git a/include/applets.h b/include/applets.h index 465ecdbdd..397a8b789 100644 --- a/include/applets.h +++ b/include/applets.h | |||
@@ -287,7 +287,9 @@ USE_TEE(APPLET(tee, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) | |||
287 | USE_TELNET(APPLET(telnet, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) | 287 | USE_TELNET(APPLET(telnet, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
288 | USE_TELNETD(APPLET(telnetd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) | 288 | USE_TELNETD(APPLET(telnetd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) |
289 | USE_TEST(APPLET(test, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) | 289 | USE_TEST(APPLET(test, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
290 | #if ENABLE_FEATURE_TFTP_GET || ENABLE_FEATURE_TFTP_PUT | ||
290 | USE_TFTP(APPLET(tftp, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) | 291 | USE_TFTP(APPLET(tftp, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
292 | #endif | ||
291 | USE_TIME(APPLET(time, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) | 293 | USE_TIME(APPLET(time, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
292 | USE_TOP(APPLET(top, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) | 294 | USE_TOP(APPLET(top, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
293 | USE_TOUCH(APPLET(touch, _BB_DIR_BIN, _BB_SUID_NEVER)) | 295 | USE_TOUCH(APPLET(touch, _BB_DIR_BIN, _BB_SUID_NEVER)) |
diff --git a/networking/nc.c b/networking/nc.c index 37e658d4b..09d89b0a8 100644 --- a/networking/nc.c +++ b/networking/nc.c | |||
@@ -23,8 +23,8 @@ int nc_main(int argc, char **argv) | |||
23 | /* sfd sits _here_ only because of "repeat" option (-l -l). */ | 23 | /* sfd sits _here_ only because of "repeat" option (-l -l). */ |
24 | int sfd = sfd; /* for gcc */ | 24 | int sfd = sfd; /* for gcc */ |
25 | int cfd = 0; | 25 | int cfd = 0; |
26 | unsigned lport = 0; | ||
26 | SKIP_NC_SERVER(const) unsigned do_listen = 0; | 27 | SKIP_NC_SERVER(const) unsigned do_listen = 0; |
27 | SKIP_NC_SERVER(const) unsigned lport = 0; | ||
28 | SKIP_NC_EXTRA (const) unsigned wsecs = 0; | 28 | SKIP_NC_EXTRA (const) unsigned wsecs = 0; |
29 | SKIP_NC_EXTRA (const) unsigned delay = 0; | 29 | SKIP_NC_EXTRA (const) unsigned delay = 0; |
30 | SKIP_NC_EXTRA (const int execparam = 0;) | 30 | SKIP_NC_EXTRA (const int execparam = 0;) |
diff --git a/networking/tftp.c b/networking/tftp.c index 9aa87d57e..eb192d8fc 100644 --- a/networking/tftp.c +++ b/networking/tftp.c | |||
@@ -22,6 +22,8 @@ | |||
22 | #include "busybox.h" | 22 | #include "busybox.h" |
23 | 23 | ||
24 | 24 | ||
25 | #if ENABLE_FEATURE_TFTP_GET || ENABLE_FEATURE_TFTP_PUT | ||
26 | |||
25 | #define TFTP_BLOCKSIZE_DEFAULT 512 /* according to RFC 1350, don't change */ | 27 | #define TFTP_BLOCKSIZE_DEFAULT 512 /* according to RFC 1350, don't change */ |
26 | #define TFTP_TIMEOUT 5 /* seconds */ | 28 | #define TFTP_TIMEOUT 5 /* seconds */ |
27 | #define TFTP_NUM_RETRIES 5 /* number of retries */ | 29 | #define TFTP_NUM_RETRIES 5 /* number of retries */ |
@@ -56,8 +58,8 @@ static const char *const tftp_bb_error_msg[] = { | |||
56 | #else | 58 | #else |
57 | #define USE_GETPUT(a) a | 59 | #define USE_GETPUT(a) a |
58 | /* masks coming from getpot32 */ | 60 | /* masks coming from getpot32 */ |
59 | #define CMD_GET(cmd) (cmd & 1) | 61 | #define CMD_GET(cmd) ((cmd) & 1) |
60 | #define CMD_PUT(cmd) (cmd & 2) | 62 | #define CMD_PUT(cmd) ((cmd) & 2) |
61 | #endif | 63 | #endif |
62 | /* NB: in the code below | 64 | /* NB: in the code below |
63 | * CMD_GET(cmd) and CMD_GET(cmd) are mutually exclusive | 65 | * CMD_GET(cmd) and CMD_GET(cmd) are mutually exclusive |
@@ -508,3 +510,5 @@ int tftp_main(int argc, char **argv) | |||
508 | } | 510 | } |
509 | return result; | 511 | return result; |
510 | } | 512 | } |
513 | |||
514 | #endif /* ENABLE_FEATURE_TFTP_GET || ENABLE_FEATURE_TFTP_PUT */ | ||