1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-29 03:17:53 -04:00

xstrcmp: Make both parameters point to const.

This commit is contained in:
Kalle Olavi Niemitalo 2007-01-28 01:43:49 +02:00 committed by Kalle Olavi Niemitalo
parent 0ee76a0ef3
commit 0ba497b0d4
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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);