aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Przywara <andre.przywara@arm.com>2015-07-17 17:02:09 +0100
committerWill Deacon <will.deacon@arm.com>2015-07-20 18:25:48 +0100
commita2583dbf82ff8eb913b871fe64c0d691c4c14e3c (patch)
tree648dccac2cbe9e54d9b724f250e6fc8ad5e62752
parent823c7fd8e9f3de57853f9698b93729de3fb5175c (diff)
downloadkvmtool-a2583dbf82ff8eb913b871fe64c0d691c4c14e3c.tar.gz
kvm-ipc: use proper type for file descriptor
A socket (as any other file descriptor) is of type "int" to catch the negative error cases. Fix the declaration to allow errors to be detected. Found and needed by clang. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
-rw-r--r--kvm-ipc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kvm-ipc.c b/kvm-ipc.c
index b1c43dd8..a289d4bd 100644
--- a/kvm-ipc.c
+++ b/kvm-ipc.c
@@ -34,7 +34,7 @@ static pthread_t thread;
static int kvm__create_socket(struct kvm *kvm)
{
char full_name[PATH_MAX];
- unsigned int s;
+ int s;
struct sockaddr_un local;
int len, r;