dnsproxy: Avoid useless memset
authorLucas De Marchi <lucas.demarchi@profusion.mobi>
Wed, 23 May 2012 18:00:09 +0000 (15:00 -0300)
committerPatrik Flykt <patrik.flykt@linux.intel.com>
Mon, 28 May 2012 13:23:21 +0000 (16:23 +0300)
src/dnsproxy.c

index 83ec419..6a9b138 100644 (file)
@@ -2272,7 +2272,7 @@ static int parse_request(unsigned char *buf, int len,
        if (hdr->qr != 0 || qdcount != 1)
                return -EINVAL;
 
-       memset(name, 0, size);
+       name[0] = '\0';
 
        ptr = buf + sizeof(struct domain_hdr);
        remain = len - sizeof(struct domain_hdr);