(read_conf_file): Little optimization.
authordrepper <drepper>
Mon, 1 Dec 1997 16:42:42 +0000 (16:42 +0000)
committerdrepper <drepper>
Mon, 1 Dec 1997 16:42:42 +0000 (16:42 +0000)
iconv/gconv_conf.c

index 8a72c7a..fb03372 100644 (file)
@@ -322,11 +322,8 @@ read_conf_file (const char *filename, const char *directory, size_t dir_len,
       if (endp != NULL)
        *endp = '\0';
       else
-       {
-         endp = strchr (rp, '\n');
-         if (endp != NULL)
-           *endp = '\0';
-       }
+       if (rp[n - 1] == '\n')
+         rp[n - 1] = '\0';
 
       while (isspace (*rp))
        ++rp;