summaryrefslogtreecommitdiff
path: root/nptl/sysdeps/pthread/gai_misc.h
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/sysdeps/pthread/gai_misc.h')
-rw-r--r--nptl/sysdeps/pthread/gai_misc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/nptl/sysdeps/pthread/gai_misc.h b/nptl/sysdeps/pthread/gai_misc.h
index 1dc351a2de..9f6a73dad1 100644
--- a/nptl/sysdeps/pthread/gai_misc.h
+++ b/nptl/sysdeps/pthread/gai_misc.h
@@ -30,7 +30,7 @@
#define GAI_MISC_NOTIFY(waitlist) \
do { \
- if (--*waitlist->counterp == 0) \
+ if (*waitlist->counterp > 0 && --*waitlist->counterp == 0) \
lll_futex_wake (waitlist->counterp, 1); \
} while (0)