summaryrefslogtreecommitdiff
path: root/debug
diff options
context:
space:
mode:
authorPaul Pluzhnikov <ppluzhnikov@google.com>2012-06-13 09:57:18 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2012-06-13 09:57:18 -0700
commitceb9e56b3d1f8c1922e0526c2e841373843460e2 (patch)
treed4e8a467540d705187cd5015cbdfd8356133b4ff /debug
parentddb28975144a7fd620ac2cae6fa219f73bd9e790 (diff)
downloadglibc-ceb9e56b3d1f8c1922e0526c2e841373843460e2.tar.gz
Suppress sign-conversion warning from FD_SET.
[BZ #14210] See <http://sourceware.org/ml/libc-alpha/2012-05/msg01794.html>. * debug/fdelt_chk.c (__fdelt_chk): Accept and return long int, not unsigned long int. * misc/bits/select2.h (__fdelt_chk, __fdelt_warn, __FD_ELT): Likewise.
Diffstat (limited to 'debug')
-rw-r--r--debug/fdelt_chk.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/debug/fdelt_chk.c b/debug/fdelt_chk.c
index 5e06f8f6a9..ded3f2f64c 100644
--- a/debug/fdelt_chk.c
+++ b/debug/fdelt_chk.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2011 Free Software Foundation, Inc.
+/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,10 +18,10 @@
#include <sys/select.h>
-unsigned long int
-__fdelt_chk (unsigned long int d)
+long int
+__fdelt_chk (long int d)
{
- if (d >= FD_SETSIZE)
+ if (d < 0 || d >= FD_SETSIZE)
__chk_fail ();
return d / __NFDBITS;