mirror of
https://github.com/vim/vim.git
synced 2025-10-06 05:44:14 -04:00
patch 8.0.0109
Problem: Still checking if memcmp() exists while every system should have it now. Solution: Remove vim_memcmp(). (James McCoy, closes #1295)
This commit is contained in:
21
src/misc2.c
21
src/misc2.c
@@ -1740,27 +1740,6 @@ vim_memset(void *ptr, int c, size_t size)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef VIM_MEMCMP
|
||||
/*
|
||||
* Return zero when "b1" and "b2" are the same for "len" bytes.
|
||||
* Return non-zero otherwise.
|
||||
*/
|
||||
int
|
||||
vim_memcmp(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
|
||||
|
||||
/* skipped when generating prototypes, the prototype is in vim.h */
|
||||
#ifdef VIM_MEMMOVE
|
||||
/*
|
||||
|
Reference in New Issue
Block a user