From: Lucas De Marchi Date: Wed, 23 May 2012 18:00:09 +0000 (-0300) Subject: dnsproxy: Avoid useless memset X-Git-Tag: 2.0_alpha~148 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6636320dc4c4b3254631098b4e748f0e38090344;p=framework%2Fconnectivity%2Fconnman.git dnsproxy: Avoid useless memset --- diff --git a/src/dnsproxy.c b/src/dnsproxy.c index 83ec419..6a9b138 100644 --- a/src/dnsproxy.c +++ b/src/dnsproxy.c @@ -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);