aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-03-19 23:37:32 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-03-19 23:37:32 +0000
commit0a0180cdc54c87ab53c48705cb2d49b8c19f460e (patch)
tree87450fe3914911f24abd964c6b32c3c979f42e2a
parent104d544fd740c9d583893a476935f0e7fd44345c (diff)
downloadbusybox-0a0180cdc54c87ab53c48705cb2d49b8c19f460e.tar.gz
tftpd: small trivial shrink
tftpd_main 502 488 -14
-rw-r--r--networking/tftp.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/networking/tftp.c b/networking/tftp.c
index bea215c01..bd9dc9b63 100644
--- a/networking/tftp.c
+++ b/networking/tftp.c
@@ -623,9 +623,7 @@ int tftpd_main(int argc ATTRIBUTE_UNUSED, char **argv)
char *local_file, *mode;
const char *error_msg;
int opt, result, opcode;
- int local_fd = local_fd; /* for compiler */
- int blksize = blksize;
- USE_GETPUT(int cmd = cmd;)
+ int blksize = TFTP_BLKSIZE_DEFAULT;
INIT_G();
@@ -658,14 +656,13 @@ int tftpd_main(int argc ATTRIBUTE_UNUSED, char **argv)
}
local_file = block_buf + 2;
if (local_file[0] == '.' || strstr(local_file, "/.")) {
- error_msg = "dot in local_file";
+ error_msg = "dot in file name";
goto err;
}
mode = local_file + strlen(local_file) + 1;
if (mode >= block_buf + result || strcmp(mode, "octet") != 0) {
goto err;
}
- blksize = TFTP_BLKSIZE_DEFAULT;
#if ENABLE_FEATURE_TFTP_BLOCKSIZE
{
char *res;