am 9579ee38: am 6e42398d: Merge "Fix return value." into gingerbread

Merge commit '9579ee380c06f1ac6ca85c78d5172c82f10555d0'

* commit '9579ee380c06f1ac6ca85c78d5172c82f10555d0':
  Fix return value.
This commit is contained in:
rich cannings 2010-08-31 15:55:44 -07:00 committed by Android Git Automerger
commit 964a14d0dd

View File

@ -38,18 +38,9 @@ void *memccpy(void *dst, const void *src, int c, size_t n)
for (;;) {
if (ch == c || p >= p_end) break;
*q++ = ch = *p++;
if (ch == c || p >= p_end) break;
*q++ = ch = *p++;
if (ch == c || p >= p_end) break;
*q++ = ch = *p++;
if (ch == c || p >= p_end) break;
*q++ = ch = *p++;
}
if (p >= p_end)
if (p >= p_end && ch != c)
return NULL;
return q;