summaryrefslogtreecommitdiff
path: root/ipc/ipc_hash.c
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2012-01-09 10:01:56 +0000
committerRichard Braun <rbraun@sceen.net>2012-01-09 10:01:56 +0000
commit3496138ca428a7b2b69fe08e69fb544006a9a2cc (patch)
tree38a675ce4e9ec23ed283e66ce7e4c7e5d8355efb /ipc/ipc_hash.c
parent88382234bb540544a3550d1ddfb84e0d17eec971 (diff)
Improve ipc hash/marequest init readability
Use macros instead of raw numeric values. * ipc/ipc_hash.h (IPC_HASH_GLOBAL_SIZE): New macro. * ipc/ipc_hash.c (ipc_hash_init): Directly set the global hash table size to IPC_HASH_GLOBAL_SIZE. * ipc/ipc_marequest.h (IPC_MAREQUEST_SIZE): New macro. * ipc/ipc_marequest.c (ipc_marequest_init): Directly set the marequest hash table size to IPC_MAREQUEST_SIZE.
Diffstat (limited to 'ipc/ipc_hash.c')
-rw-r--r--ipc/ipc_hash.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/ipc/ipc_hash.c b/ipc/ipc_hash.c
index a1ca225..ad05016 100644
--- a/ipc/ipc_hash.c
+++ b/ipc/ipc_hash.c
@@ -535,10 +535,9 @@ ipc_hash_init(void)
{
ipc_hash_index_t i;
- /* if not configured, initialize ipc_hash_global_size */
+ /* initialize ipc_hash_global_size */
- if (ipc_hash_global_size == 0)
- ipc_hash_global_size = 256;
+ ipc_hash_global_size = IPC_HASH_GLOBAL_SIZE;
/* make sure it is a power of two */