+2005-08-19 Bruno Haible <bruno@clisp.org>
+
+ * localealias.c (read_alias_file): In case of failure, close the
+ file descriptor and sort the array before returning.
+
2005-08-19 Bruno Haible <bruno@clisp.org>
* localealias.c (read_alias_file) [IN_LIBGLOCALE]: Ignore aliases
if (nmap >= maxmap)
if (__builtin_expect (extend_alias_table (), 0))
- return added;
+ goto out;
alias_len = strlen (alias) + 1;
value_len = strlen (value) + 1;
? alias_len + value_len : 1024));
char *new_pool = (char *) realloc (string_space, new_size);
if (new_pool == NULL)
- return added;
+ goto out;
if (__builtin_expect (string_space != new_pool, 0))
{
while (strchr (buf, '\n') == NULL);
}
+ out:
/* Should we test for ferror()? I think we have to silently ignore
errors. --drepper */
fclose (fp);