summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2010-01-08 18:51:14 +1100
committerDarren Tucker <dtucker@zip.com.au>2010-01-08 18:51:14 +1100
commit75694dbe77c56c127a2d2cfd443a0d591f441a55 (patch)
tree65a784d791df2b235c6984a90fcbbf685189ae2d
parent5246df47a4e01fb4c17c672fea31f041c88205e9 (diff)
- djm@cvs.openbsd.org 2009/12/06 23:53:45
[roaming_common.c] use socklen_t for getsockopt optlen parameter; reported by Steve.McClellan AT radisys.com, ok dtucker@
-rw-r--r--ChangeLog4
-rw-r--r--roaming_common.c10
2 files changed, 9 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index bf909dc3d..94fb34c3b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -95,6 +95,10 @@
95 - dtucker@cvs.openbsd.org 2009/12/06 23:41:15 95 - dtucker@cvs.openbsd.org 2009/12/06 23:41:15
96 [sshconnect2.c] 96 [sshconnect2.c]
97 zap unused variable and strlen; from Steve McClellan, ok djm 97 zap unused variable and strlen; from Steve McClellan, ok djm
98 - djm@cvs.openbsd.org 2009/12/06 23:53:45
99 [roaming_common.c]
100 use socklen_t for getsockopt optlen parameter; reported by
101 Steve.McClellan AT radisys.com, ok dtucker@
98 102
9920091226 10320091226
100 - (tim) [contrib/cygwin/Makefile] Install ssh-copy-id and ssh-copy-id.1 104 - (tim) [contrib/cygwin/Makefile] Install ssh-copy-id and ssh-copy-id.1
diff --git a/roaming_common.c b/roaming_common.c
index 272deade3..3885a0368 100644
--- a/roaming_common.c
+++ b/roaming_common.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: roaming_common.c,v 1.6 2009/10/24 11:22:37 andreas Exp $ */ 1/* $OpenBSD: roaming_common.c,v 1.7 2009/12/06 23:53:45 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2004-2009 AppGate Network Security AB 3 * Copyright (c) 2004-2009 AppGate Network Security AB
4 * 4 *
@@ -52,9 +52,9 @@ int
52get_snd_buf_size() 52get_snd_buf_size()
53{ 53{
54 int fd = packet_get_connection_out(); 54 int fd = packet_get_connection_out();
55 int optval, optvallen; 55 int optval;
56 socklen_t optvallen = sizeof(optval);
56 57
57 optvallen = sizeof(optval);
58 if (getsockopt(fd, SOL_SOCKET, SO_SNDBUF, &optval, &optvallen) != 0) 58 if (getsockopt(fd, SOL_SOCKET, SO_SNDBUF, &optval, &optvallen) != 0)
59 optval = DEFAULT_ROAMBUF; 59 optval = DEFAULT_ROAMBUF;
60 return optval; 60 return optval;
@@ -64,9 +64,9 @@ int
64get_recv_buf_size() 64get_recv_buf_size()
65{ 65{
66 int fd = packet_get_connection_in(); 66 int fd = packet_get_connection_in();
67 int optval, optvallen; 67 int optval;
68 socklen_t optvallen = sizeof(optval);
68 69
69 optvallen = sizeof(optval);
70 if (getsockopt(fd, SOL_SOCKET, SO_RCVBUF, &optval, &optvallen) != 0) 70 if (getsockopt(fd, SOL_SOCKET, SO_RCVBUF, &optval, &optvallen) != 0)
71 optval = DEFAULT_ROAMBUF; 71 optval = DEFAULT_ROAMBUF;
72 return optval; 72 return optval;