summaryrefslogtreecommitdiff
path: root/sock.c
diff options
context:
space:
mode:
Diffstat (limited to 'sock.c')
-rw-r--r--sock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sock.c b/sock.c
index 10199a4..a84796c 100644
--- a/sock.c
+++ b/sock.c
@@ -168,7 +168,7 @@ static int get_system_socket_mem(int which)
static void set_system_socket_mem(int which, int val)
{
- if (sysctl_set_int(sock_mem[which], val))
+ if (val > 0 && sysctl_set_int(sock_mem[which], val))
printf("Cannot set system socket memory in %s%s: %s\n",
SYSCTL_PROC_PATH, sock_mem[which], strerror(errno));
}