]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
kvm tools: Fix kvm-ipc.c build breakage
authorAsias He <asias.hejun@gmail.com>
Mon, 9 Jan 2012 09:18:01 +0000 (17:18 +0800)
committerPekka Enberg <penberg@kernel.org>
Mon, 9 Jan 2012 19:02:28 +0000 (21:02 +0200)
      CC       kvm-ipc.o
    kvm-ipc.c: In function ???kvm_ipc__send_msg???:
    kvm-ipc.c:53:34: error: comparison between signed and unsigned integer
    expressions [-Werror=sign-compare]
    cc1: all warnings being treated as errors

Reported-by: Jean-Philippe Menil <jean-philippe.menil@univ-nantes.fr>
Signed-off-by: Asias He <asias.hejun@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/kvm-ipc.c

index dbe236337b09f82bd35c622ba75d29874850f101..5b6588229429002f1bcfe053a8a16ae125560d6b 100644 (file)
@@ -50,7 +50,7 @@ int kvm_ipc__send_msg(int fd, u32 type, u32 len, u8 *msg)
        if (write_in_full(fd, &head, sizeof(head)) != sizeof(head))
                return -1;
 
-       if (write_in_full(fd, msg, len) != len)
+       if (write_in_full(fd, msg, len) < 0)
                return -1;
 
        return 0;