Fix failing tests for stringlib

This commit is contained in:
2016-03-27 13:21:47 -07:00
parent b5be0cd1ff
commit ee1149fb37

View File

@@ -21,7 +21,7 @@ void *memset(void *s, int c, size_t n)
if ( s == NULL ) { if ( s == NULL ) {
return NULL; return NULL;
} }
while ( ((int)d - (int)s) <= n ) { while ( (d - (int *)s) <= n ) {
*d = c; *d = c;
d += sizeof(int); d += sizeof(int);
} }
@@ -59,7 +59,6 @@ int strncat(char *dest, char *src, size_t n)
int strcmp(char *s1, char *s2) int strcmp(char *s1, char *s2)
{ {
int d = 0;
int s1len = 0; int s1len = 0;
if ( s1 == NULL || s2 == NULL ) { if ( s1 == NULL || s2 == NULL ) {