Patchwork [8/9] remove useless cast

login
register
mail settings
Submitter Juan Quintela
Date March 9, 2010, 10:26 p.m.
Message ID <6be4897d8984b612bf66186128b562d1c76e6aa9.1268173345.git.quintela@redhat.com>
Download mbox | patch
Permalink /patch/47199/
State New
Headers show

Comments

Juan Quintela - March 9, 2010, 10:26 p.m.
values are alread pointers, no need to cast them to void *

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 migration-exec.c |    2 +-
 migration-fd.c   |    3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

Patch

diff --git a/migration-exec.c b/migration-exec.c
index 76518a6..fddbd70 100644
--- a/migration-exec.c
+++ b/migration-exec.c
@@ -142,7 +142,7 @@  int exec_start_incoming_migration(const char *command)

     qemu_set_fd_read_handler(qemu_stdio_fd(f),
                              exec_accept_incoming_migration,
-                             (void *)(unsigned long)f);
+                             f);

     return 0;
 }
diff --git a/migration-fd.c b/migration-fd.c
index 8a4c2b8..e683a82 100644
--- a/migration-fd.c
+++ b/migration-fd.c
@@ -136,8 +136,7 @@  int fd_start_incoming_migration(const char *infd)
         return -errno;
     }

-    qemu_set_fd_read_handler(fd, fd_accept_incoming_migration,
-                             (void *)(unsigned long)f);
+    qemu_set_fd_read_handler(fd, fd_accept_incoming_migration, f);

     return 0;
 }