svm: fix mq coverity warning
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I1914366c17fa05305d57d842793fad372319256a
This commit is contained in:
Florin Coras
committed by
Dave Barach
parent
eef15396f6
commit
f9db7f0ff5
@ -532,7 +532,7 @@ F: src/plugins/mdata/
|
|||||||
Plugin - Unit Tests
|
Plugin - Unit Tests
|
||||||
I: unittest
|
I: unittest
|
||||||
M: Dave Barach <vpp@barachs.net>
|
M: Dave Barach <vpp@barachs.net>
|
||||||
M: Florin Coras <fcoras@cisco.com
|
M: Florin Coras <fcoras@cisco.com>
|
||||||
F: src/plugins/unittest/
|
F: src/plugins/unittest/
|
||||||
|
|
||||||
Test Infrastructure
|
Test Infrastructure
|
||||||
|
@ -570,8 +570,13 @@ svm_msg_q_timedwait (svm_msg_q_t *mq, double timeout)
|
|||||||
|
|
||||||
tv.tv_sec = (u64) timeout;
|
tv.tv_sec = (u64) timeout;
|
||||||
tv.tv_usec = ((u64) timeout - (u64) timeout) * 1e9;
|
tv.tv_usec = ((u64) timeout - (u64) timeout) * 1e9;
|
||||||
setsockopt (mq->q.evtfd, SOL_SOCKET, SO_RCVTIMEO, (const char *) &tv,
|
rv = setsockopt (mq->q.evtfd, SOL_SOCKET, SO_RCVTIMEO,
|
||||||
sizeof tv);
|
(const char *) &tv, sizeof tv);
|
||||||
|
if (rv < 0)
|
||||||
|
{
|
||||||
|
clib_unix_warning ("setsockopt");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
rv = read (mq->q.evtfd, &buf, sizeof (buf));
|
rv = read (mq->q.evtfd, &buf, sizeof (buf));
|
||||||
if (rv < 0)
|
if (rv < 0)
|
||||||
|
Reference in New Issue
Block a user