imaxdiv: Avoid link error on OSF/1 with DTK cc.
[gnulib.git] / lib / regexec.c
index 9388ac1..5ad438f 100644 (file)
@@ -1,6 +1,5 @@
 /* Extended regular expression matching and search library.
-   Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
-   Software Foundation, Inc.
+   Copyright (C) 2002-2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
 
@@ -3402,6 +3401,8 @@ build_trtable (const re_dfa_t *dfa, re_dfastate_t *state)
        {
          state->trtable = (re_dfastate_t **)
            calloc (sizeof (re_dfastate_t *), SBC_MAX);
+          if (BE (state->trtable == NULL, 0))
+            return false;
          return true;
        }
       return false;