projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mem_calloc -> p_new
[apps/madmutt.git]
/
lib
/
rx.c
diff --git
a/lib/rx.c
b/lib/rx.c
index
772fa8d
..
616d824
100644
(file)
--- a/
lib/rx.c
+++ b/
lib/rx.c
@@
-16,10
+16,10
@@
#include "str.h"
rx_t *rx_compile (const char *s, int flags) {
#include "str.h"
rx_t *rx_compile (const char *s, int flags) {
- rx_t *pp =
mem_calloc (1, sizeof (rx_t)
);
+ rx_t *pp =
p_new(rx_t, 1
);
pp->pattern = str_dup (s);
pp->pattern = str_dup (s);
- pp->rx =
mem_calloc (1, sizeof (regex_t)
);
+ pp->rx =
p_new(regex_t, 1
);
if (REGCOMP(pp->rx, NONULL (s), flags) != 0)
rx_free (&pp);
if (REGCOMP(pp->rx, NONULL (s), flags) != 0)
rx_free (&pp);