From 4c98c1d8a3bbf25c3f577c9c0a723ac8b8e9491f Mon Sep 17 00:00:00 2001 From: Radim Kolar Date: Fri, 5 Jun 2020 17:08:31 +0200 Subject: [PATCH] Use FD_SETSIZE instead of some kind of lucky guess --- common/udp_io.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/common/udp_io.c b/common/udp_io.c index 33a049e..fa127a2 100644 --- a/common/udp_io.c +++ b/common/udp_io.c @@ -16,8 +16,6 @@ #include #endif - -#define DSIZE (sizeof(int)*8) #define SAVE_ERRNO(A) { int sav; sav = errno; A; errno = sav; } #ifndef EXOS_IPC @@ -97,10 +95,10 @@ int _x_select (fd_set * rf, long tt) /* tt is in unit of ms */ if(tt < MIN_DELAY) tt = MIN_DELAY; timeout.tv_sec = tt / 1000; timeout.tv_usec = (tt % 1000)*1000; - return(select(DSIZE, rf, NULL, NULL, &timeout)); + return(select(FD_SETSIZE, rf, NULL, NULL, &timeout)); } - return(select(DSIZE, rf, NULL, NULL , (struct timeval *) 0)); + return(select(FD_SETSIZE, rf, NULL, NULL , (struct timeval *) 0)); } #endif /* not EXOS_IPC */