From 03ef7762ea12f3b034a2281040bd61c74fd36386 Mon Sep 17 00:00:00 2001 From: shejialuo Date: Mon, 6 Oct 2025 14:32:23 +0800 Subject: string-list: use bool instead of int for "exact_match" The "exact_match" parameter in "get_entry_index" is used to indicate whether a string is found or not, which is fundamentally a true/false value. As we allow the use of bool, let's use bool instead of int to make the function more semantically clear. Signed-off-by: shejialuo Signed-off-by: Junio C Hamano --- string-list.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'string-list.h') diff --git a/string-list.h b/string-list.h index 2b438c7733..bc7f38022e 100644 --- a/string-list.h +++ b/string-list.h @@ -172,7 +172,7 @@ void string_list_remove_empty_items(struct string_list *list, int free_util); /* Use these functions only on sorted lists: */ /** Determine if the string_list has a given string or not. */ -int string_list_has_string(const struct string_list *list, const char *string); +bool string_list_has_string(const struct string_list *list, const char *string); int string_list_find_insert_index(const struct string_list *list, const char *string, int negative_existing_index); -- cgit v1.3-5-g9baa