Skip to content

Commit

Permalink
fsdev/virtfs-proxy-helper: Fix improper use of negative value
Browse files Browse the repository at this point in the history
It's detected by coverity. Check the return value of proxy_marshal.

Signed-off-by: Shannon Zhao <[email protected]>
Signed-off-by: Shannon Zhao <[email protected]>
Signed-off-by: Aneesh Kumar K.V <[email protected]>
  • Loading branch information
Shannon Zhao authored and kvaneesh committed Mar 16, 2015
1 parent 9005c3b commit 821c447
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fsdev/virtfs-proxy-helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,9 @@ static int send_status(int sockfd, struct iovec *iovec, int status)
*/
msg_size = proxy_marshal(iovec, 0, "ddd", header.type,
header.size, status);
if (msg_size < 0) {
return msg_size;
}
retval = socket_write(sockfd, iovec->iov_base, msg_size);
if (retval < 0) {
return retval;
Expand Down

0 comments on commit 821c447

Please sign in to comment.