aboutsummaryrefslogtreecommitdiff
path: root/kern
diff options
context:
space:
mode:
Diffstat (limited to 'kern')
-rw-r--r--kern/exception.c5
-rw-r--r--kern/ipc_mig.c5
-rw-r--r--kern/syscall_sw.h8
3 files changed, 8 insertions, 10 deletions
diff --git a/kern/exception.c b/kern/exception.c
index 2ff122f2..0d8191a7 100644
--- a/kern/exception.c
+++ b/kern/exception.c
@@ -449,9 +449,8 @@ exception_raise(
receiver = ipc_thread_queue_first(&dest_mqueue->imq_threads);
if ((receiver == ITH_NULL) ||
- !((receiver->swap_func == (void (*)()) mach_msg_continue) ||
- ((receiver->swap_func ==
- (void (*)()) mach_msg_receive_continue) &&
+ !((receiver->swap_func == mach_msg_continue) ||
+ ((receiver->swap_func == mach_msg_receive_continue) &&
(sizeof(struct mach_exception) <= receiver->ith_msize) &&
((receiver->ith_option & MACH_RCV_NOTIFY) == 0))) ||
!thread_handoff(self, exception_raise_continue, receiver)) {
diff --git a/kern/ipc_mig.c b/kern/ipc_mig.c
index 7ed12faa..f353009e 100644
--- a/kern/ipc_mig.c
+++ b/kern/ipc_mig.c
@@ -285,10 +285,7 @@ mig_put_reply_port(
* len - Length of destination buffer.
*/
vm_size_t
-mig_strncpy(dest, src, len)
- char *dest;
- const char *src;
- int len;
+mig_strncpy(char *dest, const char *src, int len)
{
char *dest_ = dest;
int i;
diff --git a/kern/syscall_sw.h b/kern/syscall_sw.h
index 80b1810b..34eaf90b 100644
--- a/kern/syscall_sw.h
+++ b/kern/syscall_sw.h
@@ -35,9 +35,11 @@
* Note: this is indexed manually by locore.S!
*/
+typedef void (*generic_trap_function)(void);
+
typedef struct {
int mach_trap_arg_count;
- int (*mach_trap_function)();
+ generic_trap_function mach_trap_function;
boolean_t mach_trap_stack;
const char *mach_trap_name;
} mach_trap_t;
@@ -46,8 +48,8 @@ extern mach_trap_t mach_trap_table[];
extern int mach_trap_count;
#define MACH_TRAP(name, arg_count) \
- { (arg_count), (int (*)()) (name), FALSE, #name }
+ { (arg_count), (generic_trap_function) (name), FALSE, #name }
#define MACH_TRAP_STACK(name, arg_count) \
- { (arg_count), (int (*)()) (name), TRUE, #name }
+ { (arg_count), (generic_trap_function) (name), TRUE, #name }
#endif /* _KERN_SYSCALL_SW_H_ */