summaryrefslogtreecommitdiffstats
path: root/plugins/netutils.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/netutils.c')
-rw-r--r--plugins/netutils.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/netutils.c b/plugins/netutils.c
index 4ca3168d..92fd1420 100644
--- a/plugins/netutils.c
+++ b/plugins/netutils.c
@@ -32,7 +32,7 @@
32#include "common.h" 32#include "common.h"
33#include "netutils.h" 33#include "netutils.h"
34 34
35int socket_timeout = DEFAULT_SOCKET_TIMEOUT; 35unsigned int socket_timeout = DEFAULT_SOCKET_TIMEOUT;
36int econn_refuse_state = STATE_CRITICAL; 36int econn_refuse_state = STATE_CRITICAL;
37int was_refused = FALSE; 37int was_refused = FALSE;
38int address_family = AF_UNSPEC; 38int address_family = AF_UNSPEC;
@@ -131,7 +131,7 @@ process_tcp_request2 (char *server_address, int server_port,
131 else { /* it has */ 131 else { /* it has */
132 recv_result = 132 recv_result =
133 recv (sd, recv_buffer + recv_length, 133 recv (sd, recv_buffer + recv_length,
134 recv_size - recv_length - 1, 0); 134 (size_t)recv_size - recv_length - 1, 0);
135 if (recv_result == -1) { 135 if (recv_result == -1) {
136 /* recv failed, bail out */ 136 /* recv failed, bail out */
137 strcpy (recv_buffer + recv_length, ""); 137 strcpy (recv_buffer + recv_length, "");
@@ -201,7 +201,7 @@ process_request (char *server_address, int server_port, int proto,
201 } 201 }
202 202
203 else { 203 else {
204 recv_result = recv (sd, recv_buffer, recv_size - 1, 0); 204 recv_result = recv (sd, recv_buffer, (size_t)recv_size - 1, 0);
205 if (recv_result == -1) { 205 if (recv_result == -1) {
206 strcpy (recv_buffer, ""); 206 strcpy (recv_buffer, "");
207 if (proto != IPPROTO_TCP) 207 if (proto != IPPROTO_TCP)