aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2018-11-13 14:28:17 +0100
committerAndreas Schneider <asn@samba.org>2018-11-13 14:32:09 +0100
commitce38138a9ac1b9e36b3338ee9ebcdc5686d541a4 (patch)
tree2faf41c34af24ef9798f2eeec2027a4c3980da86
parentac18c80e2096f0edc542273325fb2571d35cb796 (diff)
downloadsocket_wrapper-ce38138a9ac1b9e36b3338ee9ebcdc5686d541a4.tar.gz
socket_wrapper-ce38138a9ac1b9e36b3338ee9ebcdc5686d541a4.tar.xz
socket_wrapper-ce38138a9ac1b9e36b3338ee9ebcdc5686d541a4.zip
swrap: Fix comparison of different signedness
Found by csbuild. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
-rw-r--r--src/socket_wrapper.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c
index 2b77ceb..ae3b2b0 100644
--- a/src/socket_wrapper.c
+++ b/src/socket_wrapper.c
@@ -1539,7 +1539,7 @@ static int find_socket_info_index(int fd)
return -1;
}
- if (fd >= socket_fds_max) {
+ if ((size_t)fd >= socket_fds_max) {
SWRAP_LOG(SWRAP_LOG_ERROR,
"The max socket index limit of %zu has been reached, "
"trying to add %d",
@@ -1590,7 +1590,7 @@ static int swrap_create_socket(struct socket_info *si, int fd)
{
int idx;
- if (fd >= socket_fds_max) {
+ if ((size_t)fd >= socket_fds_max) {
SWRAP_LOG(SWRAP_LOG_ERROR,
"The max socket index limit of %zu has been reached, "
"trying to add %d",