diff options
author | 2009-12-06 23:53:45 +0000 | |
---|---|---|
committer | 2009-12-06 23:53:45 +0000 | |
commit | ee50eab57162c8b0b094c33002d7226e9c6b75bf (patch) | |
tree | 90cf4492a0d90825bc3da5acbf8c2c0beec690a6 | |
parent | zap unused variable and strlen; from Steve McClellan, ok djm (diff) | |
download | wireguard-openbsd-ee50eab57162c8b0b094c33002d7226e9c6b75bf.tar.xz wireguard-openbsd-ee50eab57162c8b0b094c33002d7226e9c6b75bf.zip |
use socklen_t for getsockopt optlen parameter; reported by
Steve.McClellan AT radisys.com, ok dtucker@
-rw-r--r-- | usr.bin/ssh/roaming_common.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/ssh/roaming_common.c b/usr.bin/ssh/roaming_common.c index 3304ae98897..335d40239a3 100644 --- a/usr.bin/ssh/roaming_common.c +++ b/usr.bin/ssh/roaming_common.c @@ -1,4 +1,4 @@ -/* $OpenBSD: roaming_common.c,v 1.6 2009/10/24 11:22:37 andreas Exp $ */ +/* $OpenBSD: roaming_common.c,v 1.7 2009/12/06 23:53:45 djm Exp $ */ /* * Copyright (c) 2004-2009 AppGate Network Security AB * @@ -48,9 +48,9 @@ int get_snd_buf_size() { int fd = packet_get_connection_out(); - int optval, optvallen; + int optval; + socklen_t optvallen = sizeof(optval); - optvallen = sizeof(optval); if (getsockopt(fd, SOL_SOCKET, SO_SNDBUF, &optval, &optvallen) != 0) optval = DEFAULT_ROAMBUF; return optval; @@ -60,9 +60,9 @@ int get_recv_buf_size() { int fd = packet_get_connection_in(); - int optval, optvallen; + int optval; + socklen_t optvallen = sizeof(optval); - optvallen = sizeof(optval); if (getsockopt(fd, SOL_SOCKET, SO_RCVBUF, &optval, &optvallen) != 0) optval = DEFAULT_ROAMBUF; return optval; |