chiark / gitweb /
[PATCH] klibc: update to version 0.196
[elogind.git] / klibc / klibc / memchr.c
index c5c5fa29632672a8735465667b297c38549c3707..2e5e4cc7f20b977642af202c3b398042f0778e76 100644 (file)
@@ -12,6 +12,7 @@ void *memchr(const void *s, int c, size_t n)
   while ( n-- ) {
     if ( *sp == (unsigned char)c )
       return (void *)sp;
+    sp++;
   }
 
   return NULL;