summaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
authorEric Andersen2004-10-13 07:25:01 +0000
committerEric Andersen2004-10-13 07:25:01 +0000
commit9789bf1019e27b3b73d045515bf59c734f964066 (patch)
tree1f8f1a69a9e4f4a60fcf8898c3003d7437e739cc /networking
parent1aee3ff8bb2ee6bdd51b0b4f6bac388b24934f96 (diff)
downloadbusybox-9789bf1019e27b3b73d045515bf59c734f964066.zip
busybox-9789bf1019e27b3b73d045515bf59c734f964066.tar.gz
return failure when nslookup fails
Diffstat (limited to 'networking')
-rw-r--r--networking/nslookup.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/networking/nslookup.c b/networking/nslookup.c
index bb691d6..936fa33 100644
--- a/networking/nslookup.c
+++ b/networking/nslookup.c
@@ -197,7 +197,10 @@ int nslookup_main(int argc, char **argv)
host = xgethostbyname(argv[1]);
}
hostent_fprint(host, "Name: ");
- return EXIT_SUCCESS;
+ if (host) {
+ return EXIT_SUCCESS;
+ }
+ return EXIT_FAILURE;
}
-/* $Id: nslookup.c,v 1.32 2004/03/15 08:28:48 andersen Exp $ */
+/* $Id: nslookup.c,v 1.33 2004/10/13 07:25:01 andersen Exp $ */