xstrdup tftp cleanup from Jeff Garzik

This commit is contained in:
Eric Andersen committed 2001-03-23 17:10:19 +00:00
1 parent 21af752b04
commit 6b2c23d847
2 files changed
+8 -10

No files matched your search

+4 -5
View File
@@ -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);
+4 -5
View File
@@ -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);