1
0
mirror of https://github.com/php/php-src.git synced 2026-04-08 00:22:52 +02:00
This commit is contained in:
Antony Dovgal
2006-12-20 19:08:48 +00:00
parent 0d7af28a40
commit 698ea5f48e

View File

@@ -171,9 +171,13 @@ zend_memnstr(char *haystack, char *needle, int needle_len, char *end)
static inline void *zend_memrchr(const void *s, int c, size_t n)
{
register unsigned char *e = (unsigned char *)s + n;
register unsigned char *e;
for (e--; e >= (unsigned char *)s; e--) {
if (n <= 0) {
return NULL;
}
for (e = (unsigned char *)s + n - 1; e >= (unsigned char *)s; e--) {
if (*e == (unsigned char)c) {
return (void *)e;
}