summaryrefslogtreecommitdiff
path: root/tftp.c
diff options
context:
space:
mode:
authorEric Andersen2001-03-23 17:10:19 +0000
committerEric Andersen2001-03-23 17:10:19 +0000
commit6b2c23d847a0942e6dcc5735a5a5512ab1432d28 (patch)
treebb635a9ec39e2055e0d3b2fd386d18bb12cebfcc /tftp.c
parent21af752b04f6b78aee4e7052d96a88e719010c3c (diff)
downloadbusybox-6b2c23d847a0942e6dcc5735a5a5512ab1432d28.zip
busybox-6b2c23d847a0942e6dcc5735a5a5512ab1432d28.tar.gz
xstrdup tftp cleanup from Jeff Garzik
Diffstat (limited to 'tftp.c')
-rw-r--r--tftp.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/tftp.c b/tftp.c
index e4e01b9..309df36 100644
--- a/tftp.c
+++ b/tftp.c
@@ -387,12 +387,11 @@ 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;
- }
+ if ((host = gethostbyname(s))) {
+ bad = 0;
}
free(s);