about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/network/res_send.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/res_send.c b/src/network/res_send.c
index b9cea0bf..ee4abf1f 100644
--- a/src/network/res_send.c
+++ b/src/network/res_send.c
@@ -3,7 +3,7 @@
 int __res_send(const unsigned char *msg, int msglen, unsigned char *answer, int anslen)
 {
 	int r = __res_msend(1, &msg, &msglen, &answer, &anslen, anslen);
-	return r<0 ? r : anslen;
+	return r<0 || !anslen ? -1 : anslen;
 }
 
 weak_alias(__res_send, res_send);