Remove debugging statement.
[oweals/busybox.git] / tftp.c
diff --git a/tftp.c b/tftp.c
index e4e01b9a2f780cd90dfb3f8746408891044a0e68..bb75c88ecf9e6d2af972aa75e5e1d217a78f8fbc 100644 (file)
--- a/tftp.c
+++ b/tftp.c
@@ -116,7 +116,7 @@ static inline int tftp(int cmd, struct hostent *host,
        len = sizeof(sa);
 
        memset(&sa, 0, len);
-       bind(socketfd, &sa, len);
+       bind(socketfd, (struct sockaddr *)&sa, len);
 
        sa.sin_family = host->h_addrtype;
        sa.sin_port = htons(port);
@@ -387,19 +387,13 @@ int tftp_main(int argc, char **argv)
 
                serverfile = cp + 1;
 
-               if ((s = strdup(serverstr))) {
-                       s[cp - serverstr] = '\0';
+               s = xstrdup(serverstr);
+               s[cp - serverstr] = '\0';
 
-                       if ((host = gethostbyname(s))) {
-                               bad = 0;
-                       }
-               }
+               host = xgethostbyname(s);
 
                free(s);
        }
-       if (bad) {
-               error_msg_and_die("bad \"server:file\" combination");
-       }
 
        if (BB_TFTP_DEBUG) {
                printf("using server \"%s\", serverfile \"%s\","