chiark / gitweb /
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 8a3fe70c8b34b2258b3d4deb0880c98c89d7e8ed..56a65af2eeb23a2fff8443fab13e59d648a995f4 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) {