From 8c10e1b660be1286439e15c9a955461f25b53616 Mon Sep 17 00:00:00 2001 From: "Dr. David von Oheimb" Date: Tue, 21 Apr 2020 14:08:49 +0200 Subject: [PATCH] Clean up macro definitions of openssl_fdset() in apps.h and sockets.h Reviewed-by: Richard Levitte Reviewed-by: David von Oheimb (Merged from https://github.com/openssl/openssl/pull/4277) --- apps/include/apps.h | 8 +------- include/internal/sockets.h | 4 ++-- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/apps/include/apps.h b/apps/include/apps.h index 7789bd2b0a..a8da7ac9f4 100644 --- a/apps/include/apps.h +++ b/apps/include/apps.h @@ -12,6 +12,7 @@ # include "e_os.h" /* struct timeval for DTLS */ # include "internal/nelem.h" +# include "internal/sockets.h" /* for openssl_fdset() */ # include # include @@ -35,13 +36,6 @@ # include "fmt.h" # include "platform.h" -/* also in include/internal/sockets.h */ -# if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_WINCE) -# define openssl_fdset(a,b) FD_SET((unsigned int)a, b) -# else -# define openssl_fdset(a,b) FD_SET(a, b) -# endif - /* * quick macro when you need to pass an unsigned char instead of a char. * this is true for some implementations of the is*() functions, for diff --git a/include/internal/sockets.h b/include/internal/sockets.h index e7708516d8..6d17363d9b 100644 --- a/include/internal/sockets.h +++ b/include/internal/sockets.h @@ -154,9 +154,9 @@ struct servent *PASCAL getservbyname(const char *, const char *); /* also in apps/include/apps.h */ # if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_WINCE) -# define openssl_fdset(a,b) FD_SET((unsigned int)a, b) +# define openssl_fdset(a, b) FD_SET((unsigned int)(a), b) # else -# define openssl_fdset(a,b) FD_SET(a, b) +# define openssl_fdset(a, b) FD_SET(a, b) # endif #endif -- 2.25.1