From e185d57e9933806ede21294acb2a3283a840b6c7 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 24 Jun 2015 17:58:12 -0700 Subject: Use unsigned types for counters in getaddrinfo_a code. --- resolv/gai_misc.h | 2 +- resolv/gai_suspend.c | 2 +- resolv/getaddrinfo_a.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'resolv') diff --git a/resolv/gai_misc.h b/resolv/gai_misc.h index 502cad6a8a..92f968830c 100644 --- a/resolv/gai_misc.h +++ b/resolv/gai_misc.h @@ -31,7 +31,7 @@ struct waitlist #ifndef DONT_NEED_GAI_MISC_COND pthread_cond_t *cond; #endif - volatile int *counterp; + volatile unsigned int *counterp; /* The next field is used in asynchronous `lio_listio' operations. */ struct sigevent *sigevp; /* XXX See requestlist, it's used to work around the broken signal diff --git a/resolv/gai_suspend.c b/resolv/gai_suspend.c index 26a2b4e353..c3a1288360 100644 --- a/resolv/gai_suspend.c +++ b/resolv/gai_suspend.c @@ -35,7 +35,7 @@ gai_suspend (const struct gaicb *const list[], int ent, pthread_cond_t cond = PTHREAD_COND_INITIALIZER; #endif int cnt; - int cntr = 1; + unsigned int cntr = 1; int none = 1; int result; diff --git a/resolv/getaddrinfo_a.c b/resolv/getaddrinfo_a.c index b7ae37290b..e6372228c9 100644 --- a/resolv/getaddrinfo_a.c +++ b/resolv/getaddrinfo_a.c @@ -28,7 +28,7 @@ /* We need this special structure to handle asynchronous I/O. */ struct async_waitlist { - int counter; + unsigned int counter; struct sigevent sigev; struct waitlist list[0]; }; @@ -40,7 +40,7 @@ getaddrinfo_a (int mode, struct gaicb *list[], int ent, struct sigevent *sig) struct sigevent defsigev; struct requestlist *requests[ent]; int cnt; - volatile int total = 0; + volatile unsigned int total = 0; int result = 0; /* Check arguments. */ -- cgit v1.2.3