mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-28 21:03:54 -06:00
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 <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
d81e54de59
commit
e0efb993b8
4 changed files with 10 additions and 10 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue