summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Lai <ray@cvs.openbsd.org>2006-03-22 13:29:27 +0000
committerRay Lai <ray@cvs.openbsd.org>2006-03-22 13:29:27 +0000
commit959f075402b5382286866f3c8a0345297a75b97c (patch)
tree78d9033f0bf7b48e064f40e6aa6636779168799b
parentd940652ff9076aa67eda3535062cceadcd3ec6be (diff)
Pass size of correct variable to memset().
From Alexey Dobriyan. OK otto@
-rw-r--r--lib/libc/net/getaddrinfo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/net/getaddrinfo.c b/lib/libc/net/getaddrinfo.c
index 500afceefa4..b7d13003d27 100644
--- a/lib/libc/net/getaddrinfo.c
+++ b/lib/libc/net/getaddrinfo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: getaddrinfo.c,v 1.53 2005/07/18 14:38:39 jmc Exp $ */
+/* $OpenBSD: getaddrinfo.c,v 1.54 2006/03/22 13:29:26 ray Exp $ */
/* $KAME: getaddrinfo.c,v 1.31 2000/08/31 17:36:43 itojun Exp $ */
/*
@@ -1185,7 +1185,7 @@ _dns_getaddrinfo(const char *name, const struct addrinfo *pai)
struct addrinfo sentinel, *cur;
struct res_target q, q2;
- memset(&q, 0, sizeof(q2));
+ memset(&q, 0, sizeof(q));
memset(&q2, 0, sizeof(q2));
memset(&sentinel, 0, sizeof(sentinel));
cur = &sentinel;