From 5465b8c85efda20a79d23db28fde7ee403aec8f3 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Wed, 31 Aug 2016 11:15:25 -0700 Subject: Add socklen_t check with substitution, use socklen_t as needed --- tests/tcp_proxy/main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'tests/tcp_proxy/main.c') diff --git a/tests/tcp_proxy/main.c b/tests/tcp_proxy/main.c index 3a62c98c..5ea53f5f 100644 --- a/tests/tcp_proxy/main.c +++ b/tests/tcp_proxy/main.c @@ -121,7 +121,7 @@ g_tcp_socket(void) { int rv; int option_value; - unsigned int option_len; + socklen_t option_len; rv = (int)socket(AF_INET, SOCK_STREAM, 0); if (rv < 0) @@ -336,9 +336,7 @@ static int APP_CC g_tcp_socket_ok(int sck) { int opt; - unsigned int opt_len; - - opt_len = sizeof(opt); + socklen_t opt_len = sizeof(opt); if (getsockopt(sck, SOL_SOCKET, SO_ERROR, (char *)(&opt), &opt_len) == 0) { -- cgit v1.2.1