]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: regex.c (wcs_regex_compile): Use appropriate string to compare with collati...
authorIsamu Hasegawa <isamu@yamato.ibm.com>
Mon, 13 Aug 2001 02:23:00 +0000 (02:23 +0000)
committerDJ Delorie <dj@gcc.gnu.org>
Mon, 13 Aug 2001 02:23:00 +0000 (22:23 -0400)
Merge from libc:
* regex.c (wcs_regex_compile): Use appropriate string
to compare with collating element.
Fix the padding for the alignment.

From-SVN: r44838

libiberty/ChangeLog
libiberty/regex.c

index 0a2b29542ade6834751d90c114cafbd600136145..9431ae514014602faab317b33993bf80f3bf84b5 100644 (file)
@@ -1,3 +1,9 @@
+2001-08-12  Isamu Hasegawa  <isamu@yamato.ibm.com>
+
+       * regex.c (wcs_regex_compile): Use appropriate string
+       to compare with collating element.
+       Fix the padding for the alignment.
+
 2001-08-10  Andrew Cagney  <ac131313@redhat.com>
 
        * lbasename.c (lbasename): Change function definition to return a
index 555d3bbf66aaebe74dd139b151277d5015216d15..f22047caa03b8b6858eaf6627115491b7f2fc045 100644 (file)
@@ -3059,7 +3059,7 @@ PREFIX(regex_compile) (ARG_PREFIX(pattern), ARG_PREFIX(size), syntax, bufp)
                                    /* First compare the hashing value.  */
                                    if (symb_table[2 * elem] == hash
                                        && c1 == extra[symb_table[2 * elem + 1]]
-                                       && memcmp (str,
+                                       && memcmp (char_str,
                                                   &extra[symb_table[2 * elem + 1]
                                                         + 1], c1) == 0)
                                      {
@@ -3079,7 +3079,7 @@ PREFIX(regex_compile) (ARG_PREFIX(pattern), ARG_PREFIX(size), syntax, bufp)
                                       in the table.  */
                                    idx += 1 + extra[idx];
                                    /* Adjust for the alignment.  */
-                                   idx = (idx + 3) & ~4;
+                                   idx = (idx + 3) & ~3;
 
                                    str[0] = (wchar_t) idx + 4;
                                  }