From ea161661142ab98568ea811ce791da538da981d1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 14 Jan 2005 09:06:25 +0000 Subject: [PATCH] Update. 2005-01-14 Ulrich Drepper * posix/regcomp.c [!_LIBC] (init_dfa): Fix determining of relevant LC_* variable. Patch by Aharon Robbins . * stdlib/fmtmsg.c (internal_addseverity): Remove incorrect free call. * stdlib/tst-fmtmsg.c (main): Add another addseverity test. --- ChangeLog | 8 ++++++++ posix/regcomp.c | 8 ++++---- stdlib/fmtmsg.c | 5 +---- stdlib/tst-fmtmsg.c | 6 ++++++ 4 files changed, 19 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4601adf..798a728 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2005-01-14 Ulrich Drepper + + * posix/regcomp.c [!_LIBC] (init_dfa): Fix determining of relevant + LC_* variable. Patch by Aharon Robbins . + + * stdlib/fmtmsg.c (internal_addseverity): Remove incorrect free call. + * stdlib/tst-fmtmsg.c (main): Add another addseverity test. + 2005-01-12 Ulrich Drepper * elf/dl-load.c (_dl_map_object_from_fd): We don't have to allow diff --git a/posix/regcomp.c b/posix/regcomp.c index 5de5bf7..a8c1f74 100644 --- a/posix/regcomp.c +++ b/posix/regcomp.c @@ -1,5 +1,5 @@ /* Extended regular expression matching and search library. - Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. + Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . @@ -894,9 +894,9 @@ init_dfa (dfa, pat_len) codeset_name = nl_langinfo (CODESET); # else codeset_name = getenv ("LC_ALL"); - if (codeset_name == NULL || codeset[0] == '\0') + if (codeset_name == NULL || codeset_name[0] == '\0') codeset_name = getenv ("LC_CTYPE"); - if (codeset_name == NULL || codeset[0] == '\0') + if (codeset_name == NULL || codeset_name[0] == '\0') codeset_name = getenv ("LANG"); if (codeset_name == NULL) codeset_name = ""; @@ -1164,7 +1164,7 @@ optimize_subexps (so, node, sidx, depth) && so->nodes[node->left->node_idx].type == OP_OPEN_SUBEXP ? depth + 1 : 0; node->right = optimize_subexps (so, node->right, sidx, new_depth); - + if (node->type != CONCAT) return node; if ((depth & 1) == 0 diff --git a/stdlib/fmtmsg.c b/stdlib/fmtmsg.c index 2ab97b7..9e654c6 100644 --- a/stdlib/fmtmsg.c +++ b/stdlib/fmtmsg.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997,1999,2000,2001,2002,2003 Free Software Foundation, Inc. +/* Copyright (C) 1997,1999,2000-2003,2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -324,9 +324,6 @@ internal_addseverity (int severity, const char *string) if (runp != NULL) { - /* Release old string. */ - free ((char *) runp->string); - if (string != NULL) /* Change the string. */ runp->string = string; diff --git a/stdlib/tst-fmtmsg.c b/stdlib/tst-fmtmsg.c index d5369bd..0b244e2 100644 --- a/stdlib/tst-fmtmsg.c +++ b/stdlib/tst-fmtmsg.c @@ -48,5 +48,11 @@ main (void) != MM_OK) result = 1; + if (addseverity (MM_TEST, NULL) != MM_OK) + { + puts ("second addseverity failed"); + result = 1; + } + return result; } -- 2.7.4