Use safe wrappers inside "#if 0" too
This commit is contained in:
parent
7ef3fdec00
commit
ad9ecd52fa
@ -148,9 +148,9 @@ static TAILQ_HEAD(criteria_head, criterion) criteria =
|
|||||||
*/
|
*/
|
||||||
static void push_criterion(void *unused_criteria, const char *type,
|
static void push_criterion(void *unused_criteria, const char *type,
|
||||||
const char *value) {
|
const char *value) {
|
||||||
struct criterion *criterion = malloc(sizeof(struct criterion));
|
struct criterion *criterion = smalloc(sizeof(struct criterion));
|
||||||
criterion->type = strdup(type);
|
criterion->type = sstrdup(type);
|
||||||
criterion->value = strdup(value);
|
criterion->value = sstrdup(value);
|
||||||
TAILQ_INSERT_TAIL(&criteria, criterion, criteria);
|
TAILQ_INSERT_TAIL(&criteria, criterion, criteria);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -202,9 +202,9 @@ static TAILQ_HEAD(criteria_head, criterion) criteria =
|
|||||||
*/
|
*/
|
||||||
static void push_criterion(void *unused_criteria, const char *type,
|
static void push_criterion(void *unused_criteria, const char *type,
|
||||||
const char *value) {
|
const char *value) {
|
||||||
struct criterion *criterion = malloc(sizeof(struct criterion));
|
struct criterion *criterion = smalloc(sizeof(struct criterion));
|
||||||
criterion->type = strdup(type);
|
criterion->type = sstrdup(type);
|
||||||
criterion->value = strdup(value);
|
criterion->value = sstrdup(value);
|
||||||
TAILQ_INSERT_TAIL(&criteria, criterion, criteria);
|
TAILQ_INSERT_TAIL(&criteria, criterion, criteria);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user