Reinstate avoidance of pointless zero-length allocation.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 17 May 2014 12:50:58 +0000 (13:50 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 17 May 2014 12:50:58 +0000 (13:50 +0100)
This was removed while I tested hacks to the lower-level functions.

src/types.c

index 8a3fe70..56a65af 100644 (file)
@@ -521,7 +521,7 @@ static adns_status append_addrs(adns_query qu, adns_query from, size_t rrsz,
   size_t drrsz = *dlen*rrsz, srrsz = slen*rrsz;
   byte *p;
 
-  /* if (!slen) return adns_s_ok; */
+  if (!slen) return adns_s_ok;
   p = adns__alloc_interim(qu, drrsz + srrsz);
   if (!p) R_NOMEM;
   if (*dlen) {