mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 22:18:33 +00:00
Use memcmp instead of vim_memcmp
This commit is contained in:

committed by
Thiago de Arruda

parent
07dad7acf3
commit
bd78282940
22
src/misc2.c
22
src/misc2.c
@@ -1408,28 +1408,6 @@ void vim_free(void *x)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef VIM_MEMCMP
|
||||
/*
|
||||
* Return zero when "b1" and "b2" are the same for "len" bytes.
|
||||
* Return non-zero otherwise.
|
||||
*/
|
||||
int vim_memcmp(b1, b2, len)
|
||||
void *b1;
|
||||
void *b2;
|
||||
size_t len;
|
||||
{
|
||||
char_u *p1 = (char_u *)b1, *p2 = (char_u *)b2;
|
||||
|
||||
for (; len > 0; --len) {
|
||||
if (*p1 != *p2)
|
||||
return 1;
|
||||
++p1;
|
||||
++p2;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if (!defined(HAVE_STRCASECMP) && !defined(HAVE_STRICMP)) || defined(PROTO)
|
||||
/*
|
||||
* Compare two strings, ignoring case, using current locale.
|
||||
|
Reference in New Issue
Block a user