From 4583feee5969a11383a24187cff2a47abb02fa47 Mon Sep 17 00:00:00 2001 From: Paul Riou Date: Thu, 3 Dec 2020 19:17:42 +0000 Subject: common: make 'lenient_strcmp' arguments const Prevents build failures when calling the function with 'const char *' arguments. This is also more accurate since the function is not expected to modify the args. --- include/stringop.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/stringop.h b/include/stringop.h index e3f4f0f7..8d7089e9 100644 --- a/include/stringop.h +++ b/include/stringop.h @@ -12,7 +12,7 @@ char *lenient_strcat(char *dest, const char *src); char *lenient_strncat(char *dest, const char *src, size_t len); // strcmp that also handles null pointers. -int lenient_strcmp(char *a, char *b); +int lenient_strcmp(const char *a, const char *b); // Simply split a string with delims, free with `list_free_items_and_destroy` list_t *split_string(const char *str, const char *delims); -- cgit v1.2.3