(extract_charset_name): Use strcspn instead of strchr loop.
authordrepper <drepper>
Fri, 15 May 1998 09:10:29 +0000 (09:10 +0000)
committerdrepper <drepper>
Fri, 15 May 1998 09:10:29 +0000 (09:10 +0000)
wcsmbs/wcsmbsload.c

index 1f40655..f2699b6 100644 (file)
@@ -96,8 +96,7 @@ getfct (const char *to, const char *from)
     const char *cp = str;                                                    \
     char *result = NULL;                                                     \
                                                                              \
-    while (strchr ("@.+,", *cp) == NULL)                                     \
-      ++cp;                                                                  \
+    cp += strcspn (cp, "@.+,");                                                      \
     if (*cp == '.')                                                          \
       {                                                                              \
        const char *endp = ++cp;                                              \