From 5296f6d315bdd8f1dc97348b788638327a6ab192 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Tue, 26 Jul 2011 16:08:35 -0700 Subject: h8300/m68k/xtensa: __FD_ISSET should return 0/1 Harmonise these return values with other architectures. In some cases this affects all compilers and in other cases non-gcc compilers only. Cc: Yoshinori Sato Cc: Geert Uytterhoeven Cc: Chris Zankel Cc: Ulrich Drepper Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/h8300/include/asm/posix_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/h8300') diff --git a/arch/h8300/include/asm/posix_types.h b/arch/h8300/include/asm/posix_types.h index 5c553927fc5..6f833a16f69 100644 --- a/arch/h8300/include/asm/posix_types.h +++ b/arch/h8300/include/asm/posix_types.h @@ -50,7 +50,7 @@ typedef struct { #define __FD_CLR(d, set) ((set)->fds_bits[__FDELT(d)] &= ~__FDMASK(d)) #undef __FD_ISSET -#define __FD_ISSET(d, set) ((set)->fds_bits[__FDELT(d)] & __FDMASK(d)) +#define __FD_ISSET(d, set) (!!((set)->fds_bits[__FDELT(d)] & __FDMASK(d))) #undef __FD_ZERO #define __FD_ZERO(fdsetp) (memset (fdsetp, 0, sizeof(*(fd_set *)fdsetp))) -- cgit v1.2.3-18-g5258