From ece37d66ae394a0d783f3cba8a71d7b61735b0aa Mon Sep 17 00:00:00 2001 From: Marin Ramesa Date: Mon, 16 Dec 2013 23:55:14 +0100 Subject: ipc: qualify pointers whose dereferenced values are constant with const --- ipc/ipc_entry.c | 2 +- ipc/ipc_mqueue.c | 6 +++--- ipc/ipc_object.c | 2 +- ipc/ipc_port.c | 8 ++++---- ipc/ipc_print.h | 6 +++--- ipc/ipc_pset.c | 2 +- ipc/mach_rpc.c | 2 +- 7 files changed, 14 insertions(+), 14 deletions(-) (limited to 'ipc') diff --git a/ipc/ipc_entry.c b/ipc/ipc_entry.c index 6cb1cfb..f1d763c 100644 --- a/ipc/ipc_entry.c +++ b/ipc/ipc_entry.c @@ -841,7 +841,7 @@ ipc_entry_grow_table(space) ipc_entry_t db_ipc_object_by_name( - task_t task, + const task_t task, mach_port_t name) { ipc_space_t space = task->itk_space; diff --git a/ipc/ipc_mqueue.c b/ipc/ipc_mqueue.c index 80a34d3..72eca76 100644 --- a/ipc/ipc_mqueue.c +++ b/ipc/ipc_mqueue.c @@ -79,9 +79,9 @@ ipc_mqueue_init( void ipc_mqueue_move( - ipc_mqueue_t dest, - ipc_mqueue_t source, - ipc_port_t port) + ipc_mqueue_t dest, + ipc_mqueue_t source, + const ipc_port_t port) { ipc_kmsg_queue_t oldq, newq; ipc_thread_queue_t blockedq; diff --git a/ipc/ipc_object.c b/ipc/ipc_object.c index b8cae8f..982bd4e 100644 --- a/ipc/ipc_object.c +++ b/ipc/ipc_object.c @@ -1007,7 +1007,7 @@ char *ikot_print_array[IKOT_MAX_TYPE] = { void ipc_object_print( - ipc_object_t object) + const ipc_object_t object) { int kotype; diff --git a/ipc/ipc_port.c b/ipc/ipc_port.c index 99a6ad4..d4ade8e 100644 --- a/ipc/ipc_port.c +++ b/ipc/ipc_port.c @@ -275,9 +275,9 @@ ipc_port_dncancel( void ipc_port_pdrequest( - ipc_port_t port, - ipc_port_t notify, - ipc_port_t *previousp) + ipc_port_t port, + const ipc_port_t notify, + ipc_port_t *previousp) { ipc_port_t previous; @@ -1212,7 +1212,7 @@ ipc_port_dealloc_special( void ipc_port_print(port) - ipc_port_t port; + const ipc_port_t port; { printf("port 0x%x\n", port); diff --git a/ipc/ipc_print.h b/ipc/ipc_print.h index 0a3f645..5e8e4f3 100644 --- a/ipc/ipc_print.h +++ b/ipc/ipc_print.h @@ -26,11 +26,11 @@ #include #include -extern void ipc_port_print(ipc_port_t); +extern void ipc_port_print(const ipc_port_t); -extern void ipc_pset_print(ipc_pset_t); +extern void ipc_pset_print(const ipc_pset_t); -extern void ipc_kmsg_print(ipc_kmsg_t); +extern void ipc_kmsg_print(const ipc_kmsg_t); extern void ipc_msg_print(mach_msg_header_t*); diff --git a/ipc/ipc_pset.c b/ipc/ipc_pset.c index 29f781e..884e897 100644 --- a/ipc/ipc_pset.c +++ b/ipc/ipc_pset.c @@ -334,7 +334,7 @@ ipc_pset_destroy( void ipc_pset_print( - ipc_pset_t pset) + const ipc_pset_t pset) { printf("pset 0x%x\n", pset); diff --git a/ipc/mach_rpc.c b/ipc/mach_rpc.c index 643d0fb..e056a7f 100644 --- a/ipc/mach_rpc.c +++ b/ipc/mach_rpc.c @@ -141,7 +141,7 @@ mach_port_rpc_copy(portp, sact, dact) } kern_return_t -mach_port_rpc_sig(ipc_space_t space, char *name, char *buffer, unsigned int buflen) +mach_port_rpc_sig(const ipc_space_t space, const char *name, const char *buffer, unsigned int buflen) { return KERN_FAILURE; } -- cgit v1.2.3