aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--networking/nslookup.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/networking/nslookup.c b/networking/nslookup.c
index 8adde14b8..a7dd823f0 100644
--- a/networking/nslookup.c
+++ b/networking/nslookup.c
@@ -615,9 +615,15 @@ static int send_queries(struct ns *ns)
G.query[qn].name, rcodes[rcode]);
G.exitcode = EXIT_FAILURE;
} else {
- if (parse_reply(reply, recvlen) < 0) {
+ switch (parse_reply(reply, recvlen)) {
+ case -1:
printf("*** Can't find %s: Parse error\n", G.query[qn].name);
G.exitcode = EXIT_FAILURE;
+ break;
+
+ case 0:
+ printf("*** Can't find %s: No answer\n", G.query[qn].name);
+ break;
}
}
bb_putchar('\n');