diff options
author | Paul Riou <paul.riou@protonmail.com> | 2020-12-03 19:17:42 +0000 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2020-12-04 10:49:49 +0100 |
commit | 4583feee5969a11383a24187cff2a47abb02fa47 (patch) | |
tree | b5a81cd70444235397fa6ab233e1903b1beda1f1 /include | |
parent | xdg_shell: allow views to change geometry anytime (diff) | |
download | sway-4583feee5969a11383a24187cff2a47abb02fa47.tar.gz sway-4583feee5969a11383a24187cff2a47abb02fa47.tar.zst sway-4583feee5969a11383a24187cff2a47abb02fa47.zip |
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.
Diffstat (limited to 'include')
-rw-r--r-- | include/stringop.h | 2 |
1 files changed, 1 insertions, 1 deletions
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); | |||
12 | char *lenient_strncat(char *dest, const char *src, size_t len); | 12 | char *lenient_strncat(char *dest, const char *src, size_t len); |
13 | 13 | ||
14 | // strcmp that also handles null pointers. | 14 | // strcmp that also handles null pointers. |
15 | int lenient_strcmp(char *a, char *b); | 15 | int lenient_strcmp(const char *a, const char *b); |
16 | 16 | ||
17 | // Simply split a string with delims, free with `list_free_items_and_destroy` | 17 | // Simply split a string with delims, free with `list_free_items_and_destroy` |
18 | list_t *split_string(const char *str, const char *delims); | 18 | list_t *split_string(const char *str, const char *delims); |