Remove unused functions.

This commit is contained in:
Dianne Skoll
2024-12-24 15:05:15 -05:00
parent 34c513ba3b
commit c4aa21ff51
4 changed files with 0 additions and 60 deletions

View File

@@ -312,32 +312,6 @@ hash_table_find(hash_table *t, void *candidate)
return NULL;
}
/**
* \brief Find the next item in a hash table
*
* \param t Pointer to a hash table object
* \param obj Pointer to an object that was perviously returned by
* hash_table_find() or hash_table_find_next().
*
* \return A pointer to the next object matching obj, or NULL if
* no more exist
*/
void *
hash_table_find_next(hash_table *t, void *obj)
{
if (!obj) {
return NULL;
}
void *ptr = LINK(t, obj)->next;
while(ptr) {
if (!t->compare(obj, ptr)) {
return ptr;
}
ptr = LINK(t, ptr)->next;
}
return NULL;
}
/**
* \brief Delete an item from a hash table
*

View File

@@ -64,7 +64,6 @@ size_t hash_table_num_buckets(hash_table *t);
size_t hash_table_chain_len(hash_table *t, size_t i);
int hash_table_insert(hash_table *t, void *item);
void *hash_table_find(hash_table *t, void *candidate);
void *hash_table_find_next(hash_table *t, void *obj);
int hash_table_delete(hash_table *t, void *item);
int hash_table_delete_no_resize(hash_table *t, void *item);
void *hash_table_next(hash_table *t, void *cur);
@@ -88,29 +87,3 @@ void hash_table_get_stats(hash_table *t, struct hash_table_stats *stat);
(item); \
(item) = hash_table_next((t), (item)))
/**
* \brief Iterate over all items in a hash table that match a candidate
*
* This macro iterates over all items in a hash table that match a
* candidate object. (In general, a hash table may contain multiple
* objects with the same key.) Here is an example assuming that the hash
* table holds objects of type struct int_object:
*
* struct int_object {
* int value;
* struct hash_link link;
* }
*
* hash_table tab;
* int_object candidate;
*
* candidate.value = 7;
* int_object *item;
* hash_table_for_each_matching(item, &candidate, &tab) {
* // Do something with item, which will match "7"
* }
*/
#define hash_table_for_each_matching(item, candidate, t) \
for ((item) = hash_table_find((t), (candidate)); \
(item); \
(item) = hash_table_find_next((t), (item)))

View File

@@ -229,7 +229,6 @@ void set_cloexec(FILE *fp);
int push_call(char const *filename, char const *func, int lineno);
void clear_callstack(void);
int print_callstack(FILE *fp);
int have_callstack(void);
void pop_call(void);
void FixSpecialType(Trigger *trig);
void WriteJSONTrigger(Trigger const *t, int include_tags, int today);

View File

@@ -268,12 +268,6 @@ print_callstack_aux(FILE *fp, cs *entry)
}
}
int
have_callstack(void)
{
return (callstack != NULL);
}
int
print_callstack(FILE *fp)
{