diff options
author | Marin Ramesa <mpr@hi.t-com.hr> | 2013-12-11 00:01:34 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-12-11 00:09:43 +0100 |
commit | f167a7b8c8aaa0f5522303566a5b48d4d89782ef (patch) | |
tree | 58c061f0cae8e8f3646839cfef1d7dfdacc68faa /ipc | |
parent | af0c711a68e0ca4b8aa4e3e25fdf1f2206ec0911 (diff) |
Cleanup of the memcpy(), memmove(), memcmp() and memset() calls
Addresses were cast to (void *). Pointers uncasted.
* device/ds_routines.c (ds_read_done) (memset) (start_sent): Cast to (void *) instead to (char *). Argument is an address.
(ds_read_done) (memset) (end_data): Likewise.
* i386/i386/pcb.c (thread_getstatus) (memcpy) (pm): Don't cast. Argument is a pointer.
(thread_getstatus) (memcpy) (iopb): Likewise.
* i386/i386at/immc.c (immc_cnputc) (memmove): Cast first argument to (void *). Argument is an address.
(immc_cnputc) (memmove): Cast second argument to (void *). Argument is an address.
(immc_cnputc) (memset): Cast first argument to (void *). Argument is an address.
* i386/i386at/model_dep.c (i386at_init) (memcpy) (phystokv): Cast to (void *) instead to (char *). Argument is an address.
* i386/intel/pmap.c (pmap_init) (memset) (addr): Likewise.
* ipc/mach_debug.c (mach_port_space_info) (memset) (table_addr + size_used): Likewise.
(mach_port_space_info) (memset) (tree_addr + size_used): Likewise.
* kern/host.c (host_processor_sets) (memcpy) (newaddr): Likewise.
(host_processor_sets) (memcpy) (addr): Likewise.
* kern/xpr.c (xprbootstrap) (memset) (addr): Likewise.
* vm/vm_debug.c (mach_vm_object_pages) (memset) (addr + size_used): Likewise.
Diffstat (limited to 'ipc')
-rw-r--r-- | ipc/mach_debug.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ipc/mach_debug.c b/ipc/mach_debug.c index 28dd693..723d864 100644 --- a/ipc/mach_debug.c +++ b/ipc/mach_debug.c @@ -447,7 +447,7 @@ mach_port_space_info( table_size - rsize_used); if (size_used != rsize_used) - memset((char *) (table_addr + size_used), 0, + memset((void *) (table_addr + size_used), 0, rsize_used - size_used); kr = vm_map_copyin(ipc_kernel_map, table_addr, rsize_used, @@ -482,7 +482,7 @@ mach_port_space_info( tree_size - rsize_used); if (size_used != rsize_used) - memset((char *) (tree_addr + size_used), 0, + memset((void *) (tree_addr + size_used), 0, rsize_used - size_used); kr = vm_map_copyin(ipc_kernel_map, tree_addr, rsize_used, |