From 2b2d5e33420296c9a82d4afaeb34594f99d0715f Mon Sep 17 00:00:00 2001 From: Danny Auble <da@schedmd.com> Date: Tue, 13 Jun 2017 11:44:42 -0600 Subject: [PATCH] Move function to be in the static functions (and defined that way). No real code change. Bug 3885 --- src/common/node_conf.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/common/node_conf.c b/src/common/node_conf.c index 9f815a5a306..62ea2e6595d 100644 --- a/src/common/node_conf.c +++ b/src/common/node_conf.c @@ -96,6 +96,7 @@ static struct node_record * _find_node_record (char *name,bool test_alias,bool log_missing); static void _list_delete_config (void *config_entry); static int _list_find_config (void *config_entry, void *key); +static const char* _node_record_hash_identity (void* item); /* * _build_single_nodeline_info - From the slurm.conf reader, build table, @@ -400,6 +401,16 @@ static int _list_find_config (void *config_entry, void *key) return 0; } +/* + * xhash helper function to index node_record per name field + * in node_hash_table + */ +static const char* _node_record_hash_identity (void* item) +{ + struct node_record *node_ptr = (struct node_record *) item; + return node_ptr->name; +} + /* * bitmap2hostlist - given a bitmap, build a hostlist * IN bitmap - bitmap pointer @@ -800,15 +811,6 @@ static struct node_record *_find_node_record (char *name, bool test_alias, return NULL; } -/* - * xhash helper function to index node_record per name field - * in node_hash_table - */ -const char* node_record_hash_identity (void* item) { - struct node_record *node_ptr = (struct node_record *) item; - return node_ptr->name; -} - /* * init_node_conf - initialize the node configuration tables and values. * this should be called before creating any node or configuration @@ -988,7 +990,7 @@ extern void rehash_node (void) struct node_record *node_ptr = node_record_table_ptr; xhash_free (node_hash_table); - node_hash_table = xhash_init(node_record_hash_identity, + node_hash_table = xhash_init(_node_record_hash_identity, NULL, NULL, 0); for (i = 0; i < node_record_count; i++, node_ptr++) { if ((node_ptr->name == NULL) || -- GitLab