]> Savannah Git Hosting - gnulib.git/commitdiff
dfa: fix glitches in previous commit
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 14 Dec 2016 23:11:28 +0000 (15:11 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 14 Dec 2016 23:12:18 +0000 (15:12 -0800)
Sorry, I don't know how I managed to commit the wrong version.
* lib/dfa.c (MIN): Move up.
(xpalloc): Now static.

ChangeLog
lib/dfa.c

index e578cc6809673fd55220386210197d2ec9648d56..b7091c116db503998edeb3c919c95c6569471134 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2016-12-14  Paul Eggert  <eggert@cs.ucla.edu>
 
+       dfa: fix glitches in previous commit
+       Sorry, I don't know how I managed to commit the wrong version.
+       * lib/dfa.c (MIN): Move up.
+       (xpalloc): Now static.
+
        dfa: fix some unlikely integer overflows
        I found these while reviewing the recent Coverity-related fix.
        This patch changes part of dfa.c to prefer ptrdiff_t instead of
@@ -30,6 +35,7 @@
        expression is false.
        (realloc_trans_if_necessary):
        Remove assertion, which I hope Coverity no longer needs.
+
        * modules/dfa (Depends-on): Add intprops, stdint.
 
 2016-12-12  Jim Meyering  <meyering@fb.com>
index d0cb35b40fa44e756ae1e196ed94dd40393db993..8221086a66f67062de8222d04b98a4d516b8a81a 100644 (file)
--- a/lib/dfa.c
+++ b/lib/dfa.c
 #include "xalloc.h"
 #include "localeinfo.h"
 
+#ifndef MIN
+# define MIN(a,b) ((a) < (b) ? (a) : (b))
+#endif
+
 /* HPUX defines these as macros in sys/param.h.  */
 #ifdef setbit
 # undef setbit
@@ -749,7 +753,7 @@ emptyset (charclass const s)
    Thus, to grow an array A without saving its old contents, do
    { free (A); A = xpalloc (NULL, &AITEMS, ...); }.  */
 
-void *
+static void *
 xpalloc (void *pa, ptrdiff_t *nitems, ptrdiff_t nitems_incr_min,
         ptrdiff_t nitems_max, ptrdiff_t item_size)
 {
@@ -932,10 +936,6 @@ using_simple_locale (bool multibyte)
       }                                                \
   } while (false)
 
-#ifndef MIN
-# define MIN(a,b) ((a) < (b) ? (a) : (b))
-#endif
-
 typedef int predicate (int);
 
 /* The following list maps the names of the Posix named character classes