#include <stddef.h>
#include <string.h>
+#include "allocsa.h"
#include "c-ctype.h"
/* Knuth-Morris-Pratt algorithm.
size_t m = strlen (needle);
/* Allocate the table. */
- size_t *table = (size_t *) malloc (m * sizeof (size_t));
+ size_t *table = (size_t *) allocsa (m * sizeof (size_t));
if (table == NULL)
return false;
/* Fill the table.
}
}
- free (table);
+ freesa (table);
return true;
}