diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/command.c | 8 | ||||
-rw-r--r-- | lib/command_match.c | 10 | ||||
-rw-r--r-- | lib/ferr.c | 2 | ||||
-rw-r--r-- | lib/frr_pthread.c | 2 | ||||
-rw-r--r-- | lib/grammar_sandbox.c | 6 | ||||
-rw-r--r-- | lib/hash.c | 2 | ||||
-rw-r--r-- | lib/if.c | 4 | ||||
-rw-r--r-- | lib/keychain.c | 2 | ||||
-rw-r--r-- | lib/linklist.c | 2 | ||||
-rw-r--r-- | lib/linklist.h | 2 | ||||
-rw-r--r-- | lib/nexthop_group.c | 2 | ||||
-rw-r--r-- | lib/routemap.c | 2 | ||||
-rw-r--r-- | lib/thread.c | 4 | ||||
-rw-r--r-- | lib/wheel.c | 2 | ||||
-rw-r--r-- | lib/zclient.c | 2 |
15 files changed, 26 insertions, 26 deletions
diff --git a/lib/command.c b/lib/command.c index e4e3d786a..60c5f4e75 100644 --- a/lib/command.c +++ b/lib/command.c @@ -695,7 +695,7 @@ static vector cmd_complete_command_real(vector vline, struct vty *vty, } vector comps = completions_to_vec(completions); - list_delete_and_null(&completions); + list_delete(&completions); // set status code appropriately switch (vector_active(comps)) { @@ -1020,7 +1020,7 @@ static int cmd_execute_command_real(vector vline, enum filter_type filter, // if matcher error, return corresponding CMD_ERR if (MATCHER_ERROR(status)) { if (argv_list) - list_delete_and_null(&argv_list); + list_delete(&argv_list); switch (status) { case MATCHER_INCOMPLETE: return CMD_ERR_INCOMPLETE; @@ -1049,7 +1049,7 @@ static int cmd_execute_command_real(vector vline, enum filter_type filter, ret = matched_element->func(matched_element, vty, argc, argv); // delete list and cmd_token's in it - list_delete_and_null(&argv_list); + list_delete(&argv_list); XFREE(MTYPE_TMP, argv); return ret; @@ -2949,6 +2949,6 @@ void cmd_terminate() if (host.config) XFREE(MTYPE_HOST, host.config); - list_delete_and_null(&varhandlers); + list_delete(&varhandlers); qobj_finish(); } diff --git a/lib/command_match.c b/lib/command_match.c index a1ae3ac6b..8b34d1e3e 100644 --- a/lib/command_match.c +++ b/lib/command_match.c @@ -334,7 +334,7 @@ static enum matcher_rv command_match_r(struct graph_node *start, vector vline, status = MATCHER_INCOMPLETE; // cleanup - list_delete_and_null(&next); + list_delete(&next); return status; } @@ -367,7 +367,7 @@ enum matcher_rv command_complete(struct graph *graph, vector vline, unsigned int idx; for (idx = 0; idx < vector_active(vline) && next->count > 0; idx++) { - list_delete_and_null(¤t); + list_delete(¤t); current = next; next = list_new(); next->del = stack_del; @@ -458,8 +458,8 @@ enum matcher_rv command_complete(struct graph *graph, vector vline, } } - list_delete_and_null(¤t); - list_delete_and_null(&next); + list_delete(¤t); + list_delete(&next); return mrv; } @@ -652,7 +652,7 @@ static void del_arglist(struct list *list) list_delete_node(list, tail); // delete the rest of the list as usual - list_delete_and_null(&list); + list_delete(&list); } /*---------- token level matching functions ----------*/ diff --git a/lib/ferr.c b/lib/ferr.c index afef196ce..bf89cc7f4 100644 --- a/lib/ferr.c +++ b/lib/ferr.c @@ -167,7 +167,7 @@ void log_ref_display(struct vty *vty, uint32_t code, bool json) json_object_free(top); } - list_delete_and_null(&errlist); + list_delete(&errlist); } DEFUN_NOSH(show_error_code, diff --git a/lib/frr_pthread.c b/lib/frr_pthread.c index c1ce57e24..a0223730b 100644 --- a/lib/frr_pthread.c +++ b/lib/frr_pthread.c @@ -61,7 +61,7 @@ void frr_pthread_finish() { pthread_mutex_lock(&frr_pthread_list_mtx); { - list_delete_and_null(&frr_pthread_list); + list_delete(&frr_pthread_list); } pthread_mutex_unlock(&frr_pthread_list_mtx); } diff --git a/lib/grammar_sandbox.c b/lib/grammar_sandbox.c index 0d6200b00..20d5879c6 100644 --- a/lib/grammar_sandbox.c +++ b/lib/grammar_sandbox.c @@ -140,7 +140,7 @@ DEFUN (grammar_test_complete, vty_out(vty, "%% No match\n"); // free resources - list_delete_and_null(&completions); + list_delete(&completions); cmd_free_strvec(command); XFREE(MTYPE_TMP, cmdstr); @@ -184,7 +184,7 @@ DEFUN (grammar_test_match, vty_out(vty, "func: %p\n", element->func); - list_delete_and_null(&argvv); + list_delete(&argvv); } else { assert(MATCHER_ERROR(result)); switch (result) { @@ -421,7 +421,7 @@ DEFUN (grammar_findambig, } prev = cur; } - list_delete_and_null(&commands); + list_delete(&commands); vty_out(vty, "\n"); } while (scan && scannode < LINK_PARAMS_NODE); diff --git a/lib/hash.c b/lib/hash.c index ee5401b23..114522a75 100644 --- a/lib/hash.c +++ b/lib/hash.c @@ -318,7 +318,7 @@ void hash_free(struct hash *hash) if (_hashes) { listnode_delete(_hashes, hash); if (_hashes->count == 0) { - list_delete_and_null(&_hashes); + list_delete(&_hashes); } } } @@ -206,8 +206,8 @@ void if_delete(struct interface *ifp) if_delete_retain(ifp); - list_delete_and_null(&ifp->connected); - list_delete_and_null(&ifp->nbr_connected); + list_delete(&ifp->connected); + list_delete(&ifp->nbr_connected); if_link_params_free(ifp); diff --git a/lib/keychain.c b/lib/keychain.c index 494f6f643..601b44a4f 100644 --- a/lib/keychain.c +++ b/lib/keychain.c @@ -119,7 +119,7 @@ static void keychain_delete(struct keychain *keychain) if (keychain->name) XFREE(MTYPE_KEYCHAIN, keychain->name); - list_delete_and_null(&keychain->key); + list_delete(&keychain->key); listnode_delete(keychain_list, keychain); keychain_free(keychain); } diff --git a/lib/linklist.c b/lib/linklist.c index baacd9020..3aa7cae8b 100644 --- a/lib/linklist.c +++ b/lib/linklist.c @@ -240,7 +240,7 @@ void list_delete_all_node(struct list *list) list->count = 0; } -void list_delete_and_null(struct list **list) +void list_delete(struct list **list) { assert(*list); list_delete_all_node(*list); diff --git a/lib/linklist.h b/lib/linklist.h index 53a5012e6..0475391e9 100644 --- a/lib/linklist.h +++ b/lib/linklist.h @@ -244,7 +244,7 @@ extern void list_sort(struct list *list, * pointer to list pointer; this will be set to NULL after the list has been * deleted */ -extern void list_delete_and_null(struct list **plist); +extern void list_delete(struct list **plist); /* * Delete all nodes from a list without deleting the list itself. diff --git a/lib/nexthop_group.c b/lib/nexthop_group.c index 937b84bdd..23ea96f75 100644 --- a/lib/nexthop_group.c +++ b/lib/nexthop_group.c @@ -246,7 +246,7 @@ static void nhgc_delete(struct nexthop_group_cmd *nhgc) RB_REMOVE(nhgc_entry_head, &nhgc_entries, nhgc); - list_delete_and_null(&nhgc->nhg_list); + list_delete(&nhgc->nhg_list); XFREE(MTYPE_TMP, nhgc); } diff --git a/lib/routemap.c b/lib/routemap.c index 1d958fa59..bc45cd51d 100644 --- a/lib/routemap.c +++ b/lib/routemap.c @@ -991,7 +991,7 @@ static int vty_show_route_map(struct vty *vty, const char *name) for (ALL_LIST_ELEMENTS_RO(maplist, ln, map)) vty_show_route_map_entry(vty, map); - list_delete_and_null(&maplist); + list_delete(&maplist); } return CMD_SUCCESS; } diff --git a/lib/thread.c b/lib/thread.c index 2c3db27c7..a81faae79 100644 --- a/lib/thread.c +++ b/lib/thread.c @@ -622,7 +622,7 @@ void thread_master_free(struct thread_master *m) { listnode_delete(masters, m); if (masters->count == 0) { - list_delete_and_null(&masters); + list_delete(&masters); } } pthread_mutex_unlock(&masters_mtx); @@ -637,7 +637,7 @@ void thread_master_free(struct thread_master *m) pthread_cond_destroy(&m->cancel_cond); close(m->io_pipe[0]); close(m->io_pipe[1]); - list_delete_and_null(&m->cancel_req); + list_delete(&m->cancel_req); m->cancel_req = NULL; hash_clean(m->cpu_record, cpu_record_hash_free); diff --git a/lib/wheel.c b/lib/wheel.c index 722b02424..69d2fa48d 100644 --- a/lib/wheel.c +++ b/lib/wheel.c @@ -115,7 +115,7 @@ void wheel_delete(struct timer_wheel *wheel) int i; for (i = 0; i < wheel->slots; i++) { - list_delete_and_null(&wheel->wheel_slot_lists[i]); + list_delete(&wheel->wheel_slot_lists[i]); } THREAD_OFF(wheel->timer); diff --git a/lib/zclient.c b/lib/zclient.c index e6626a178..8b1069b82 100644 --- a/lib/zclient.c +++ b/lib/zclient.c @@ -133,7 +133,7 @@ void redist_del_instance(struct redist_proto *red, unsigned short instance) XFREE(MTYPE_REDIST_INST, id); if (!red->instances->count) { red->enabled = 0; - list_delete_and_null(&red->instances); + list_delete(&red->instances); } } |