@@ -298,26 +298,26 @@ ctl_exec_query_subtree(void *ctx, const umf_ctl_node_t *n,
298298 * ctl_find_and_execulte_node -- (internal) searches for a matching entry point in the
299299 * provided nodes
300300 *
301- * Name offset is used to return the offset of the name in the query string.
301+ * Path offset is used to return the offset of the path in the query string.
302302 * The caller is responsible for freeing all of the allocated indexes,
303303 * regardless of the return value.
304304 */
305305
306306static optional_umf_result_t
307307ctl_find_and_execute_node (const umf_ctl_node_t * nodes , void * ctx ,
308- umf_ctl_query_source_t source , const char * name ,
308+ umf_ctl_query_source_t source , const char * path ,
309309 umf_ctl_query_type_t type , void * arg , size_t size ,
310310 va_list args ) {
311311 assert (nodes != NULL );
312- assert (name != NULL );
312+ assert (path != NULL );
313313
314314 const umf_ctl_node_t * n = NULL ;
315315 optional_umf_result_t ret ;
316- size_t name_offset = 0 ;
316+ size_t path_offset = 0 ;
317317 ret .is_valid = true;
318318 ret .value = UMF_RESULT_SUCCESS ;
319319 char * sptr = NULL ;
320- char * parse_str = Strdup (name );
320+ char * parse_str = Strdup (path );
321321 if (parse_str == NULL ) {
322322 ret .is_valid = false;
323323 return ret ;
@@ -336,7 +336,7 @@ ctl_find_and_execute_node(const umf_ctl_node_t *nodes, void *ctx,
336336 */
337337 while (node_name != NULL ) {
338338 char * next_node = strtok_r (NULL , CTL_QUERY_NODE_SEPARATOR , & sptr );
339- name_offset = node_name - parse_str ;
339+ path_offset = node_name - parse_str ;
340340 if (n != NULL && n -> type == CTL_NODE_SUBTREE ) {
341341 // if a subtree occurs, the subtree handler should be called
342342 break ;
@@ -500,7 +500,7 @@ ctl_find_and_execute_node(const umf_ctl_node_t *nodes, void *ctx,
500500 // if the node is a subtree, then we need to call the subtree handler
501501 ret .value =
502502 ctl_exec_query_subtree (ctx , n , source , arg , size , indexes -> next ,
503- name + name_offset , type , args );
503+ path + path_offset , type , args );
504504 } else {
505505 switch (type ) {
506506 case CTL_QUERY_READ :
@@ -530,25 +530,25 @@ ctl_find_and_execute_node(const umf_ctl_node_t *nodes, void *ctx,
530530}
531531
532532/*
533- * ctl_query -- (internal) parses the name and calls the appropriate methods
533+ * ctl_query -- (internal) parses the path and calls the appropriate methods
534534 * from the ctl tree
535535 */
536536umf_result_t ctl_query (struct ctl * ctl , void * ctx ,
537- umf_ctl_query_source_t source , const char * name ,
537+ umf_ctl_query_source_t source , const char * path ,
538538 umf_ctl_query_type_t type , void * arg , size_t size ,
539539 va_list args ) {
540- if (name == NULL ) {
540+ if (path == NULL ) {
541541 return UMF_RESULT_ERROR_INVALID_ARGUMENT ;
542542 }
543543
544544 va_list args_copy ;
545545 va_copy (args_copy , args );
546546
547547 optional_umf_result_t ret = ctl_find_and_execute_node (
548- CTL_NODE (global ), ctx , source , name , type , arg , size , args_copy );
548+ CTL_NODE (global ), ctx , source , path , type , arg , size , args_copy );
549549
550550 if (ret .is_valid == false && ctl ) {
551- ret = ctl_find_and_execute_node (ctl -> root , ctx , source , name , type , arg ,
551+ ret = ctl_find_and_execute_node (ctl -> root , ctx , source , path , type , arg ,
552552 size , args );
553553 }
554554
@@ -573,16 +573,16 @@ void ctl_register_module_node(struct ctl *c, const char *name,
573573
574574/*
575575 * ctl_parse_query -- (internal) splits an entire query string
576- * into name and value
576+ * into path and value
577577 */
578- static int ctl_parse_query (char * qbuf , char * * name , char * * value ) {
578+ static int ctl_parse_query (char * qbuf , char * * path , char * * value ) {
579579 if (qbuf == NULL ) {
580580 return -1 ;
581581 }
582582
583583 char * sptr = NULL ;
584- * name = strtok_r (qbuf , CTL_NAME_VALUE_SEPARATOR , & sptr );
585- if (* name == NULL ) {
584+ * path = strtok_r (qbuf , CTL_NAME_VALUE_SEPARATOR , & sptr );
585+ if (* path == NULL ) {
586586 return -1 ;
587587 }
588588
@@ -608,20 +608,20 @@ static umf_result_t ctl_load_config_helper(struct ctl *ctl, void *ctx,
608608 char * buf , ...) {
609609 umf_result_t ret = UMF_RESULT_SUCCESS ;
610610 char * sptr = NULL ; /* for internal use of strtok */
611- char * name ;
611+ char * path ;
612612 char * value ;
613613 char * qbuf = strtok_r (buf , CTL_STRING_QUERY_SEPARATOR , & sptr );
614614 va_list empty_args ;
615615 va_start (empty_args , buf );
616616 while (qbuf != NULL ) {
617- int parse_res = ctl_parse_query (qbuf , & name , & value );
617+ int parse_res = ctl_parse_query (qbuf , & path , & value );
618618 if (parse_res != 0 ) {
619619 ret = UMF_RESULT_ERROR_INVALID_ARGUMENT ;
620620 goto end ;
621621 }
622622 // we do not need to copy va_list before call as we know that for query_config_input
623623 // ctl_query will not call va_arg on it. Ref 7.15/3 of C99 standard
624- ret = ctl_query (ctl , ctx , CTL_QUERY_CONFIG_INPUT , name , CTL_QUERY_WRITE ,
624+ ret = ctl_query (ctl , ctx , CTL_QUERY_CONFIG_INPUT , path , CTL_QUERY_WRITE ,
625625 value , strlen (value ) + 1 , empty_args );
626626
627627 if (ret != UMF_RESULT_SUCCESS && ctx != NULL ) {
0 commit comments