diff options
Diffstat (limited to 'networking/tftp.c')
-rw-r--r-- | networking/tftp.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/networking/tftp.c b/networking/tftp.c index dfa599ab5..42fd9d2ca 100644 --- a/networking/tftp.c +++ b/networking/tftp.c | |||
@@ -19,18 +19,6 @@ | |||
19 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. | 19 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. |
20 | * ------------------------------------------------------------------------- */ | 20 | * ------------------------------------------------------------------------- */ |
21 | 21 | ||
22 | #include <stdio.h> | ||
23 | #include <stdlib.h> | ||
24 | #include <string.h> | ||
25 | #include <sys/types.h> | ||
26 | #include <sys/socket.h> | ||
27 | #include <sys/stat.h> | ||
28 | #include <netdb.h> | ||
29 | #include <netinet/in.h> | ||
30 | #include <arpa/inet.h> | ||
31 | #include <unistd.h> | ||
32 | #include <fcntl.h> | ||
33 | |||
34 | #include "busybox.h" | 22 | #include "busybox.h" |
35 | 23 | ||
36 | 24 | ||
@@ -159,7 +147,7 @@ static int tftp(const int cmd, const struct hostent *host, | |||
159 | char *buf=xmalloc(tftp_bufsize += 4); | 147 | char *buf=xmalloc(tftp_bufsize += 4); |
160 | 148 | ||
161 | if ((socketfd = socket(PF_INET, SOCK_DGRAM, 0)) < 0) { | 149 | if ((socketfd = socket(PF_INET, SOCK_DGRAM, 0)) < 0) { |
162 | /* need to unlink the localfile, so don't use bb_xsocket here. */ | 150 | /* need to unlink the localfile, so don't use xsocket here. */ |
163 | bb_perror_msg("socket"); | 151 | bb_perror_msg("socket"); |
164 | return EXIT_FAILURE; | 152 | return EXIT_FAILURE; |
165 | } | 153 | } |
@@ -167,7 +155,7 @@ static int tftp(const int cmd, const struct hostent *host, | |||
167 | len = sizeof(sa); | 155 | len = sizeof(sa); |
168 | 156 | ||
169 | memset(&sa, 0, len); | 157 | memset(&sa, 0, len); |
170 | bb_xbind(socketfd, (struct sockaddr *)&sa, len); | 158 | xbind(socketfd, (struct sockaddr *)&sa, len); |
171 | 159 | ||
172 | sa.sin_family = host->h_addrtype; | 160 | sa.sin_family = host->h_addrtype; |
173 | sa.sin_port = port; | 161 | sa.sin_port = port; |