summaryrefslogtreecommitdiffstats
path: root/user_call/tcp_call.c
diff options
context:
space:
mode:
Diffstat (limited to 'user_call/tcp_call.c')
-rw-r--r--user_call/tcp_call.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/user_call/tcp_call.c b/user_call/tcp_call.c
index 581cd40..204638b 100644
--- a/user_call/tcp_call.c
+++ b/user_call/tcp_call.c
@@ -69,7 +69,8 @@ int main(int argc, char **argv)
/*
* Open the socket into the kernel.
*/
- if ((s = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
+ s = socket(AF_INET, SOCK_STREAM, 0);
+ if (s < 0) {
sprintf(buffer, "ERROR: can't open socket: %s\n", strerror(errno));
err(buffer);
}