]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - resolv/gai_suspend.c
elf: Add DF_1_KMOD, DF_1_WEAKFILTER, DF_1_NOCOMMON to <elf.h>
[thirdparty/glibc.git] / resolv / gai_suspend.c
index b795cdecb83fb710788e07c14ad5a7d2fc6f0e38..eee3bcebe97691de32b9694cb596110b120d6885 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2014 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2019 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2001.
 
@@ -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;
 
@@ -141,7 +141,7 @@ gai_suspend (const struct gaicb *const list[], int ent,
          /* An error occurred.  Possibly it's EINTR.  We have to translate
             the timeout error report of `pthread_cond_timedwait' to the
             form expected from `gai_suspend'.  */
-         if (__builtin_expect (result, ETIMEDOUT) == ETIMEDOUT)
+         if (__glibc_likely (result == ETIMEDOUT))
            result = EAI_AGAIN;
          else if (result == EINTR)
            result = EAI_INTR;