diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-03-12 14:43:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-12 14:43:12 +0200 |
commit | 783d0c1a1c723733adcdf4249240246fc35a5bcb (patch) | |
tree | 15745c18439463475dbc63be52fbad5fff4f6868 /Include/fileobject.h | |
parent | bc44f045e6a801903bd7530a4fc5474e657832da (diff) | |
download | cpython-git-783d0c1a1c723733adcdf4249240246fc35a5bcb.tar.gz |
bpo-28667: Fix a compile warning on FreeBSD when compare with FD_SETSIZE. (#501)
FreeBSD is the only platforms with unsigned FD_SETSIZE.
Diffstat (limited to 'Include/fileobject.h')
-rw-r--r-- | Include/fileobject.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Include/fileobject.h b/Include/fileobject.h index 6120e51ed0..1dde17e1ef 100644 --- a/Include/fileobject.h +++ b/Include/fileobject.h @@ -39,7 +39,7 @@ PyAPI_DATA(PyTypeObject) PyStdPrinter_Type; /* A routine to check if a file descriptor can be select()-ed. */ #ifdef HAVE_SELECT - #define _PyIsSelectable_fd(FD) (((FD) >= 0) && ((FD) < FD_SETSIZE)) + #define _PyIsSelectable_fd(FD) ((unsigned int)(FD) < (unsigned int)FD_SETSIZE) #else #define _PyIsSelectable_fd(FD) (1) #endif /* HAVE_SELECT */ |