Update after allocsa -> malloca renaming.
[gnulib.git] / lib / mbsstr.c
index 1876e6e..5100c39 100644 (file)
@@ -24,7 +24,7 @@
 #include <stdbool.h>
 #include <stddef.h>  /* for NULL, in case a nonstandard string.h lacks it */
 
-#include "allocsa.h"
+#include "malloca.h"
 #if HAVE_MBRTOWC
 # include "mbuiter.h"
 #endif
@@ -40,7 +40,7 @@ knuth_morris_pratt_unibyte (const char *haystack, const char *needle,
   size_t m = strlen (needle);
 
   /* Allocate the table.  */
-  size_t *table = (size_t *) allocsa (m * sizeof (size_t));
+  size_t *table = (size_t *) malloca (m * sizeof (size_t));
   if (table == NULL)
     return false;
   /* Fill the table.
@@ -114,7 +114,7 @@ knuth_morris_pratt_unibyte (const char *haystack, const char *needle,
        }
   }
 
-  freesa (table);
+  freea (table);
   return true;
 }
 
@@ -128,7 +128,7 @@ knuth_morris_pratt_multibyte (const char *haystack, const char *needle,
   size_t *table;
 
   /* Allocate room for needle_mbchars and the table.  */
-  char *memory = (char *) allocsa (m * (sizeof (mbchar_t) + sizeof (size_t)));
+  char *memory = (char *) malloca (m * (sizeof (mbchar_t) + sizeof (size_t)));
   if (memory == NULL)
     return false;
   needle_mbchars = (mbchar_t *) memory;
@@ -223,7 +223,7 @@ knuth_morris_pratt_multibyte (const char *haystack, const char *needle,
        }
   }
 
-  freesa (memory);
+  freea (memory);
   return true;
 }
 #endif