glibc-2.0.100: bits/string2.h nits

Horst von Brand vonbrand@sleipnir.valparaiso.cl
Sun Nov 8 03:04:00 GMT 1998


The library installed and (seems to) work fine here: i586,
linux-2.1.127pre7, egcs-1.1, binutils-2.9.1.0.15.

Just some nagging at /usr/include/bits/string2.h, line 825: egcs is
(justifiably) annoyed by the cast at the return of this function.  There
are similar functions surrounding this, which would give similar complaints
whenever used. As this is an internal function, the argument type or the
return type should be easy to change, or am I overlooking something?

__STRING_INLINE char *
__strpbrk_c2 (__const char *__s, char __accept1, char __accept2)
{
  /* Please note that __accept1 and __accept2 never can be '\0'.  */
  while (*__s != '\0' && *__s != __accept1 && *__s != __accept2)
    ++__s;
  return *__s == '\0' ? NULL : (char *) __s;
}
-- 
Horst von Brand                             vonbrand@sleipnir.valparaiso.cl
Casilla 9G, Viña del Mar, Chile                               +56 32 672616



More information about the Libc-hacker mailing list