diff options
| author | Furkan Sahin <furkan-dev@proton.me> | 2020-12-03 19:17:42 +0000 |
|---|---|---|
| committer | Furkan Sahin <furkan-dev@proton.me> | 2020-12-03 19:17:42 +0000 |
| commit | 220846ca01c16d11e531ebdf807d123957cbd1b7 (patch) | |
| tree | b5a81cd70444235397fa6ab233e1903b1beda1f1 /common | |
| parent | 87965daf4d1b1c44358fd8f5e0cdea0137cb5944 (diff) | |
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.c | 2 |
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) { } // strcmp that also handles null pointers. -int lenient_strcmp(char *a, char *b) { +int lenient_strcmp(const char *a, const char *b) { if (a == b) { return 0; } else if (!a) { |
