From 61ed0c99e6e4bd85a68381396e2f7e0b5337fe19 Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Mon, 26 Nov 2007 23:09:28 +0100 Subject: [PATCH] rpcrt4: socket() returns -1 on error so check the return value against that. --- dlls/rpcrt4/rpc_transport.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/rpcrt4/rpc_transport.c b/dlls/rpcrt4/rpc_transport.c index dfb7eceebe4..40cc613a6ad 100644 --- a/dlls/rpcrt4/rpc_transport.c +++ b/dlls/rpcrt4/rpc_transport.c @@ -773,7 +773,7 @@ static RPC_STATUS rpcrt4_ncacn_ip_tcp_open(RpcConnection* Connection) } sock = socket(ai_cur->ai_family, ai_cur->ai_socktype, ai_cur->ai_protocol); - if (sock < 0) + if (sock == -1) { WARN("socket() failed: %s\n", strerror(errno)); continue; @@ -850,7 +850,7 @@ static RPC_STATUS rpcrt4_protseq_ncacn_ip_tcp_open_endpoint(RpcServerProtseq *pr } sock = socket(ai_cur->ai_family, ai_cur->ai_socktype, ai_cur->ai_protocol); - if (sock < 0) + if (sock == -1) { WARN("socket() failed: %s\n", strerror(errno)); status = RPC_S_CANT_CREATE_ENDPOINT;