aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ares/ares_getnameinfo.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/ares/ares_getnameinfo.c b/ares/ares_getnameinfo.c
index 236d82bd0..504409ba4 100644
--- a/ares/ares_getnameinfo.c
+++ b/ares/ares_getnameinfo.c
@@ -1,3 +1,5 @@
+/* $Id$ */
+
/* Copyright 2005 by Dominick Meglio
*
* Permission to use, copy, modify, and distribute this
@@ -77,8 +79,8 @@ static char *ares_striendstr(const char *s1, const char *s2);
void ares_getnameinfo(ares_channel channel, const struct sockaddr *sa, socklen_t salen,
int flags, ares_nameinfo_callback callback, void *arg)
{
- struct sockaddr_in *addr;
- struct sockaddr_in6 *addr6;
+ struct sockaddr_in *addr = NULL;
+ struct sockaddr_in6 *addr6 = NULL;
struct nameinfo_query *niquery;
/* Verify the buffer size */
@@ -337,6 +339,7 @@ static char *append_scopeid(struct sockaddr_in6 *addr6, unsigned int flags,
}
#else
sprintf(&tmpbuf[1], "%u", addr6->sin6_scope_id);
+ (void) flags;
#endif
strcat(buf, tmpbuf);
return buf;