summaryrefslogtreecommitdiff
path: root/package/ndisc6/patches/patch-src_addrinfo_c
blob: 74dbe928dd6539012f275d5dcf3ddedaf57ef47c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
$Id: update-patches 24 2008-08-31 14:56:13Z wbx $
--- ndisc6-0.9.8.orig/src/addrinfo.c	2008-05-01 14:52:28.000000000 +0200
+++ ndisc6-0.9.8/src/addrinfo.c	2009-05-10 19:14:46.000000000 +0200
@@ -53,7 +53,7 @@ gai_perror (int errval, const char *msg)
 static int
 printnames (const char *name, int family, int aflags, int nflags, bool single)
 {
-	struct addrinfo hints, *res;
+	struct addrinfo hints, *res, *ptr;
 
 	memset (&hints, 0, sizeof (hints));
 	hints.ai_family = family;
@@ -67,7 +67,7 @@ printnames (const char *name, int family
 		return -1;
 	}
 
-	for (struct addrinfo *ptr = res; ptr != NULL; ptr = ptr->ai_next)
+	for (ptr = res; ptr != NULL; ptr = ptr->ai_next)
 	{
 		char hostname[NI_MAXHOST];