diff options
author | Anoop C S <anoopcs@redhat.com> | 2016-09-23 12:38:31 +0530 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2016-10-27 15:50:57 +0200 |
commit | 057a956ad4cfe2bc6e03ec9033a8a9b15e8c88a1 (patch) | |
tree | ecc6a9f11d48d24762db721f934a06756770e4bc /tests | |
parent | 63d83be5925bcefc64275be5ccb2312596bf5ce8 (diff) | |
download | socket_wrapper-057a956ad4cfe2bc6e03ec9033a8a9b15e8c88a1.tar.gz socket_wrapper-057a956ad4cfe2bc6e03ec9033a8a9b15e8c88a1.tar.xz socket_wrapper-057a956ad4cfe2bc6e03ec9033a8a9b15e8c88a1.zip |
tests: Clean-up max_sockets test case
Signed-off-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_max_sockets.c | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/tests/test_max_sockets.c b/tests/test_max_sockets.c index 0aac181..0bc694b 100644 --- a/tests/test_max_sockets.c +++ b/tests/test_max_sockets.c @@ -1,24 +1,10 @@ -#include <stdarg.h> -#include <stddef.h> -#include <setjmp.h> -#include <cmocka.h> - -#include "config.h" #include "torture.h" #include <errno.h> -#include <sys/types.h> -#include <sys/socket.h> -#include <sys/un.h> -#include <netinet/in.h> -#include <arpa/inet.h> -#include <stdlib.h> #include <stdio.h> +#include <cmocka.h> #include <unistd.h> -#ifdef HAVE_RPC_RPC_H -#include <rpc/rpc.h> -#endif - +#include <stdlib.h> #define MAX_SOCKETS 4 @@ -52,14 +38,12 @@ static int _socket(int *_s) s = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); - if (_s != NULL) { - *_s = s; - } - if (s < 0) { return -1; } + *_s = s; + return 0; } |