Skip to content

Commit 0597dd6

Browse files
stefanbellergitster
authored andcommitted
string-list: remove unused function print_string_list
A removal of this helper function was proposed 3 years ago [1]; the function was never used since it was introduced in 2006 back then, and there is no new callers since. Now time has proven we really do not need the function. [1] https://public-inbox.org/git/[email protected]/ Signed-off-by: Stefan Beller <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 53f9a3e commit 0597dd6

File tree

2 files changed

+0
-18
lines changed

2 files changed

+0
-18
lines changed

string-list.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -195,16 +195,6 @@ void string_list_clear_func(struct string_list *list, string_list_clear_func_t c
195195
list->nr = list->alloc = 0;
196196
}
197197

198-
199-
void print_string_list(const struct string_list *p, const char *text)
200-
{
201-
int i;
202-
if ( text )
203-
printf("%s\n", text);
204-
for (i = 0; i < p->nr; i++)
205-
printf("%s:%p\n", p->items[i].string, p->items[i].util);
206-
}
207-
208198
struct string_list_item *string_list_append_nodup(struct string_list *list,
209199
char *string)
210200
{

string-list.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -113,14 +113,6 @@ typedef int (*string_list_each_func_t)(struct string_list_item *, void *);
113113
void filter_string_list(struct string_list *list, int free_util,
114114
string_list_each_func_t want, void *cb_data);
115115

116-
/**
117-
* Dump a string_list to stdout, useful mainly for debugging
118-
* purposes. It can take an optional header argument and it writes out
119-
* the string-pointer pairs of the string_list, each one in its own
120-
* line.
121-
*/
122-
void print_string_list(const struct string_list *p, const char *text);
123-
124116
/**
125117
* Free a string_list. The `string` pointer of the items will be freed
126118
* in case the `strdup_strings` member of the string_list is set. The

0 commit comments

Comments
 (0)