diff options
author | Eric Andersen <andersen@codepoet.org> | 2001-03-23 17:10:19 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2001-03-23 17:10:19 +0000 |
commit | 6b2c23d847a0942e6dcc5735a5a5512ab1432d28 (patch) | |
tree | bb635a9ec39e2055e0d3b2fd386d18bb12cebfcc | |
parent | 21af752b04f6b78aee4e7052d96a88e719010c3c (diff) | |
download | busybox-w32-6b2c23d847a0942e6dcc5735a5a5512ab1432d28.tar.gz busybox-w32-6b2c23d847a0942e6dcc5735a5a5512ab1432d28.tar.bz2 busybox-w32-6b2c23d847a0942e6dcc5735a5a5512ab1432d28.zip |
xstrdup tftp cleanup from Jeff Garzik
-rw-r--r-- | networking/tftp.c | 9 | ||||
-rw-r--r-- | tftp.c | 9 |
2 files changed, 8 insertions, 10 deletions
diff --git a/networking/tftp.c b/networking/tftp.c index e4e01b9a2..309df36b3 100644 --- a/networking/tftp.c +++ b/networking/tftp.c | |||
@@ -387,12 +387,11 @@ int tftp_main(int argc, char **argv) | |||
387 | 387 | ||
388 | serverfile = cp + 1; | 388 | serverfile = cp + 1; |
389 | 389 | ||
390 | if ((s = strdup(serverstr))) { | 390 | s = xstrdup(serverstr); |
391 | s[cp - serverstr] = '\0'; | 391 | s[cp - serverstr] = '\0'; |
392 | 392 | ||
393 | if ((host = gethostbyname(s))) { | 393 | if ((host = gethostbyname(s))) { |
394 | bad = 0; | 394 | bad = 0; |
395 | } | ||
396 | } | 395 | } |
397 | 396 | ||
398 | free(s); | 397 | free(s); |
@@ -387,12 +387,11 @@ int tftp_main(int argc, char **argv) | |||
387 | 387 | ||
388 | serverfile = cp + 1; | 388 | serverfile = cp + 1; |
389 | 389 | ||
390 | if ((s = strdup(serverstr))) { | 390 | s = xstrdup(serverstr); |
391 | s[cp - serverstr] = '\0'; | 391 | s[cp - serverstr] = '\0'; |
392 | 392 | ||
393 | if ((host = gethostbyname(s))) { | 393 | if ((host = gethostbyname(s))) { |
394 | bad = 0; | 394 | bad = 0; |
395 | } | ||
396 | } | 395 | } |
397 | 396 | ||
398 | free(s); | 397 | free(s); |