Applied, thanks! Flavio Cruz, le sam. 14 janv. 2023 19:52:45 -0500, a ecrit: > We use __builtin_ffs instead of ffs. strrchr is not used. > > Also removed the commented out memset implementation since it is > implemented in arch-specific code. > --- > include/string.h | 4 ---- > kern/strings.c | 21 --------------------- > 2 files changed, 25 deletions(-) > > diff --git a/include/string.h b/include/string.h > index cddcbeb9..91c5fe46 100644 > --- a/include/string.h > +++ b/include/string.h > @@ -42,8 +42,6 @@ extern char *strcpy (char *dest, const char *src); > > extern char *strncpy (char *dest, const char *src, size_t n); > > -extern char *strrchr (const char *s, int c); > - > extern char *strsep (char **strp, const char *delim); > > extern int strcmp (const char *s1, const char *s2) __attribute__ ((pure)); > @@ -54,6 +52,4 @@ extern size_t strlen (const char *s) __attribute__ ((pure)); > > extern char *strstr(const char *haystack, const char *needle); > > -extern int ffs(int i); > - > #endif /* _MACH_SA_SYS_STRING_H_ */ > diff --git a/kern/strings.c b/kern/strings.c > index 71c99050..7e7fda02 100644 > --- a/kern/strings.c > +++ b/kern/strings.c > @@ -173,27 +173,6 @@ strlen( > return string - 1 - ret; > } > > -/* > - * Abstract: > - * memset writes value "c" in the "n" bytes starting at address "s". > - * The return value is a pointer to the "s" string. > - */ > - > -#if 0 > -void * > -memset( > - void *_s, int c, size_t n) > -{ > - char *s = _s; > - size_t i; > - > - for (i = 0; i < n ; i++) > - s[i] = c; > - > - return _s; > -} > -#endif > - > /* > * Abstract: > * strchr returns a pointer to the first occurrence of the character > -- > 2.39.0 > >
-- Samuel --- Pour une évaluation indépendante, transparente et rigoureuse ! Je soutiens la Commission d'Évaluation de l'Inria.