diff options
| author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-03-19 23:37:32 +0000 |
|---|---|---|
| committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-03-19 23:37:32 +0000 |
| commit | 0a0180cdc54c87ab53c48705cb2d49b8c19f460e (patch) | |
| tree | 87450fe3914911f24abd964c6b32c3c979f42e2a /networking | |
| parent | 104d544fd740c9d583893a476935f0e7fd44345c (diff) | |
| download | busybox-w32-0a0180cdc54c87ab53c48705cb2d49b8c19f460e.tar.gz busybox-w32-0a0180cdc54c87ab53c48705cb2d49b8c19f460e.tar.bz2 busybox-w32-0a0180cdc54c87ab53c48705cb2d49b8c19f460e.zip | |
tftpd: small trivial shrink
tftpd_main 502 488 -14
Diffstat (limited to 'networking')
| -rw-r--r-- | networking/tftp.c | 7 |
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) | |||
| 623 | char *local_file, *mode; | 623 | char *local_file, *mode; |
| 624 | const char *error_msg; | 624 | const char *error_msg; |
| 625 | int opt, result, opcode; | 625 | int opt, result, opcode; |
| 626 | int local_fd = local_fd; /* for compiler */ | 626 | int blksize = TFTP_BLKSIZE_DEFAULT; |
| 627 | int blksize = blksize; | ||
| 628 | USE_GETPUT(int cmd = cmd;) | ||
| 629 | 627 | ||
| 630 | INIT_G(); | 628 | INIT_G(); |
| 631 | 629 | ||
| @@ -658,14 +656,13 @@ int tftpd_main(int argc ATTRIBUTE_UNUSED, char **argv) | |||
| 658 | } | 656 | } |
| 659 | local_file = block_buf + 2; | 657 | local_file = block_buf + 2; |
| 660 | if (local_file[0] == '.' || strstr(local_file, "/.")) { | 658 | if (local_file[0] == '.' || strstr(local_file, "/.")) { |
| 661 | error_msg = "dot in local_file"; | 659 | error_msg = "dot in file name"; |
| 662 | goto err; | 660 | goto err; |
| 663 | } | 661 | } |
| 664 | mode = local_file + strlen(local_file) + 1; | 662 | mode = local_file + strlen(local_file) + 1; |
| 665 | if (mode >= block_buf + result || strcmp(mode, "octet") != 0) { | 663 | if (mode >= block_buf + result || strcmp(mode, "octet") != 0) { |
| 666 | goto err; | 664 | goto err; |
| 667 | } | 665 | } |
| 668 | blksize = TFTP_BLKSIZE_DEFAULT; | ||
| 669 | #if ENABLE_FEATURE_TFTP_BLOCKSIZE | 666 | #if ENABLE_FEATURE_TFTP_BLOCKSIZE |
| 670 | { | 667 | { |
| 671 | char *res; | 668 | char *res; |
