From e0efb993b817564ef84e462ac1fe35f89b57ad7b Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Wed, 23 Feb 2011 19:09:16 +0100 Subject: Fix conversions from pointer to int and vice versa Here the int values fds[0], sigfd, s, sock and fd are converted to void pointers which are later converted back to an int value. These conversions should always use intptr_t instead of unsigned long. They are needed for environments where sizeof(long) != sizeof(void *). Signed-off-by: Stefan Weil Signed-off-by: Blue Swirl --- migration-unix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'migration-unix.c') diff --git a/migration-unix.c b/migration-unix.c index 57232c07a9..8b967f2938 100644 --- a/migration-unix.c +++ b/migration-unix.c @@ -147,7 +147,7 @@ static void unix_accept_incoming_migration(void *opaque) { struct sockaddr_un addr; socklen_t addrlen = sizeof(addr); - int s = (unsigned long)opaque; + int s = (intptr_t)opaque; QEMUFile *f; int c; @@ -204,7 +204,7 @@ int unix_start_incoming_migration(const char *path) } qemu_set_fd_handler2(sock, NULL, unix_accept_incoming_migration, NULL, - (void *)(unsigned long)sock); + (void *)(intptr_t)sock); return 0; -- cgit v1.2.1