From 68bbdd1e18a87afede6cbdffdb8c7078ed3fa835 Mon Sep 17 00:00:00 2001 From: Marin Ramesa Date: Tue, 17 Dec 2013 15:58:26 +0100 Subject: Cleanup of the copyin() and copyout() calls * device/ds_routines.c (device_write_trap) (copyin) (data): Cast to (void *). Argument is an address. (device_write_trap) (copyin) (io_data): Don't cast. (device_writev_trap) (copyin) (iovec, stack_iovec): Likewise. (device_writev_trap) (copyin) (data, p): Cast to (void *). Arguments are addresses. * kern/bootstrap.c (build_args_and_stack) (copyout) (arg_count, string_pos, zero): Don't cast. * kern/ipc_mig.c (syscall_vm_map) (copyin, copyout) (addr, address): Likewise. (syscall_vm_allocate) (copyin, copyout) (addr, address): Likewise. (syscall_task_create) (copyout) (name, child_task): Likewise. (syscall_mach_port_allocate) (copyout) (name, namep): Likewise. * kern/time_stamp.c (copyout) (temp, tsp): Likewise. --- kern/bootstrap.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'kern/bootstrap.c') diff --git a/kern/bootstrap.c b/kern/bootstrap.c index c0576b7..86e238a 100644 --- a/kern/bootstrap.c +++ b/kern/bootstrap.c @@ -587,7 +587,7 @@ build_args_and_stack(struct exec_info *boot_exec_info, /* * first the argument count */ - (void) copyout((char *)&arg_count, + (void) copyout(&arg_count, arg_pos, sizeof(integer_t)); arg_pos += sizeof(integer_t); @@ -600,7 +600,7 @@ build_args_and_stack(struct exec_info *boot_exec_info, arg_item_len = strlen(arg_ptr) + 1; /* include trailing 0 */ /* set string pointer */ - (void) copyout((char *)&string_pos, + (void) copyout(&string_pos, arg_pos, sizeof (char *)); arg_pos += sizeof(char *); @@ -613,7 +613,7 @@ build_args_and_stack(struct exec_info *boot_exec_info, /* * Null terminator for argv. */ - (void) copyout((char *)&zero, arg_pos, sizeof(char *)); + (void) copyout(&zero, arg_pos, sizeof(char *)); arg_pos += sizeof(char *); /* @@ -624,7 +624,7 @@ build_args_and_stack(struct exec_info *boot_exec_info, arg_item_len = strlen(arg_ptr) + 1; /* include trailing 0 */ /* set string pointer */ - (void) copyout((char *)&string_pos, + (void) copyout(&string_pos, arg_pos, sizeof (char *)); arg_pos += sizeof(char *); @@ -637,7 +637,7 @@ build_args_and_stack(struct exec_info *boot_exec_info, /* * Null terminator for envp. */ - (void) copyout((char *)&zero, arg_pos, sizeof(char *)); + (void) copyout(&zero, arg_pos, sizeof(char *)); } -- cgit v1.2.3