Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
vcl: fix coverity warnings
[vpp.git]
/
src
/
vcl
/
sock_test_client.c
diff --git
a/src/vcl/sock_test_client.c
b/src/vcl/sock_test_client.c
index
bf46798
..
7898797
100644
(file)
--- a/
src/vcl/sock_test_client.c
+++ b/
src/vcl/sock_test_client.c
@@
-648,7
+648,14
@@
sock_test_connect_test_sockets (uint32_t num_test_sockets)
errno_val);
return tsock->fd;
}
errno_val);
return tsock->fd;
}
- fcntl (tsock->fd, F_SETFL, O_NONBLOCK);
+ if (fcntl (tsock->fd, F_SETFL, O_NONBLOCK) < 0)
+ {
+ errno_val = errno;
+ perror ("ERROR in sock_test_connect_test_sockets()");
+ fprintf (stderr, "CLIENT: ERROR: fcntl failed (errno = %d)!\n",
+ errno_val);
+ return -1;
+ }
#ifdef VCL_TEST
rv = vppcom_session_connect (tsock->fd, &scm->server_endpt);
#ifdef VCL_TEST
rv = vppcom_session_connect (tsock->fd, &scm->server_endpt);