Merge "Fix return value." into gingerbread
This commit is contained in:
commit
6e42398dd6
1 changed files with 1 additions and 10 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue