Merge "Fix return value." into gingerbread

This commit is contained in:
rich cannings 2010-08-31 15:48:25 -07:00 committed by Android (Google) Code Review
commit 6e42398dd6

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;