Commit 821c4476 authored by Shannon Zhao's avatar Shannon Zhao Committed by Aneesh Kumar K.V
Browse files

fsdev/virtfs-proxy-helper: Fix improper use of negative value



It's detected by coverity. Check the return value of proxy_marshal.

Signed-off-by: default avatarShannon Zhao <zhaoshenglong@huawei.com>
Signed-off-by: default avatarShannon Zhao <shannon.zhao@linaro.org>
Signed-off-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
parent 9005c3b3
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;