mirror of
https://github.com/rkd77/elinks.git
synced 2024-11-04 08:17:17 -05:00
xstrcmp: Make both parameters point to const.
This commit is contained in:
parent
0ee76a0ef3
commit
0ba497b0d4
@ -173,7 +173,7 @@ straconcat(const unsigned char *str, ...)
|
||||
}
|
||||
|
||||
int
|
||||
xstrcmp(unsigned char *s1, unsigned char *s2)
|
||||
xstrcmp(const unsigned char *s1, const unsigned char *s2)
|
||||
{
|
||||
if (!s1) return -!!s2;
|
||||
if (!s2) return 1;
|
||||
|
@ -64,7 +64,7 @@ unsigned char *straconcat(const unsigned char *str, ...);
|
||||
/* Misc. utility string functions. */
|
||||
|
||||
/* Compare two strings, handling correctly @s1 or @s2 being NULL. */
|
||||
int xstrcmp(unsigned char *s1, unsigned char *s2);
|
||||
int xstrcmp(const unsigned char *s1, const unsigned char *s2);
|
||||
|
||||
/* Copies at most @len chars into @dst. Ensures null termination of @dst. */
|
||||
unsigned char *safe_strncpy(unsigned char *dst, const unsigned char *src, size_t len);
|
||||
|
Loading…
Reference in New Issue
Block a user