summaryrefslogtreecommitdiff
path: root/libc/inet/resolv.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/inet/resolv.c')
-rw-r--r--libc/inet/resolv.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c
index b557b097d..4777977fe 100644
--- a/libc/inet/resolv.c
+++ b/libc/inet/resolv.c
@@ -3732,11 +3732,10 @@ int res_query(const char *dname, int class, int type,
free(a.dotted);
- if (a.atype == type) { /* CNAME */
- if (i > anslen)
- i = anslen;
- memcpy(answer, packet, i);
- }
+ if (i > anslen)
+ i = anslen;
+ memcpy(answer, packet, i);
+
free(packet);
return i;
}