aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorLibravatar Paul Riou <paul.riou@protonmail.com>2020-12-03 19:17:42 +0000
committerLibravatar Simon Ser <contact@emersion.fr>2020-12-04 10:49:49 +0100
commit4583feee5969a11383a24187cff2a47abb02fa47 (patch)
treeb5a81cd70444235397fa6ab233e1903b1beda1f1 /common
parentxdg_shell: allow views to change geometry anytime (diff)
downloadsway-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 'common')
-rw-r--r--common/stringop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/stringop.c b/common/stringop.c
index 8c8e9aa2..7fb3fe12 100644
--- a/common/stringop.c
+++ b/common/stringop.c
@@ -64,7 +64,7 @@ char *lenient_strncat(char *dest, const char *src, size_t len) {
64} 64}
65 65
66// strcmp that also handles null pointers. 66// strcmp that also handles null pointers.
67int lenient_strcmp(char *a, char *b) { 67int lenient_strcmp(const char *a, const char *b) {
68 if (a == b) { 68 if (a == b) {
69 return 0; 69 return 0;
70 } else if (!a) { 70 } else if (!a) {