Automatically reformat com32/lib/memccpy.c using Nindent.
Do this for all files except HDT, gPXE and externally maintained
libraries (zlib, tinyjpeg, libpng).
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
void *memccpy(void *dst, const void *src, int c, size_t n)
{
- char *q = dst;
- const char *p = src;
- char ch;
+ char *q = dst;
+ const char *p = src;
+ char ch;
- while ( n-- ) {
- *q++ = ch = *p++;
- if ( ch == (char)c )
- return q;
- }
+ while (n--) {
+ *q++ = ch = *p++;
+ if (ch == (char)c)
+ return q;
+ }
- return NULL; /* No instance of "c" found */
+ return NULL; /* No instance of "c" found */
}