summaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/kconfig/expr.c')
-rw-r--r--scripts/kconfig/expr.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/kconfig/expr.c b/scripts/kconfig/expr.c
index 290ce41f8ba4..d6626521f9b9 100644
--- a/scripts/kconfig/expr.c
+++ b/scripts/kconfig/expr.c
@@ -13,7 +13,7 @@
13 13
14struct expr *expr_alloc_symbol(struct symbol *sym) 14struct expr *expr_alloc_symbol(struct symbol *sym)
15{ 15{
16 struct expr *e = calloc(1, sizeof(*e)); 16 struct expr *e = xcalloc(1, sizeof(*e));
17 e->type = E_SYMBOL; 17 e->type = E_SYMBOL;
18 e->left.sym = sym; 18 e->left.sym = sym;
19 return e; 19 return e;
@@ -21,7 +21,7 @@ struct expr *expr_alloc_symbol(struct symbol *sym)
21 21
22struct expr *expr_alloc_one(enum expr_type type, struct expr *ce) 22struct expr *expr_alloc_one(enum expr_type type, struct expr *ce)
23{ 23{
24 struct expr *e = calloc(1, sizeof(*e)); 24 struct expr *e = xcalloc(1, sizeof(*e));
25 e->type = type; 25 e->type = type;
26 e->left.expr = ce; 26 e->left.expr = ce;
27 return e; 27 return e;
@@ -29,7 +29,7 @@ struct expr *expr_alloc_one(enum expr_type type, struct expr *ce)
29 29
30struct expr *expr_alloc_two(enum expr_type type, struct expr *e1, struct expr *e2) 30struct expr *expr_alloc_two(enum expr_type type, struct expr *e1, struct expr *e2)
31{ 31{
32 struct expr *e = calloc(1, sizeof(*e)); 32 struct expr *e = xcalloc(1, sizeof(*e));
33 e->type = type; 33 e->type = type;
34 e->left.expr = e1; 34 e->left.expr = e1;
35 e->right.expr = e2; 35 e->right.expr = e2;
@@ -38,7 +38,7 @@ struct expr *expr_alloc_two(enum expr_type type, struct expr *e1, struct expr *e
38 38
39struct expr *expr_alloc_comp(enum expr_type type, struct symbol *s1, struct symbol *s2) 39struct expr *expr_alloc_comp(enum expr_type type, struct symbol *s1, struct symbol *s2)
40{ 40{
41 struct expr *e = calloc(1, sizeof(*e)); 41 struct expr *e = xcalloc(1, sizeof(*e));
42 e->type = type; 42 e->type = type;
43 e->left.sym = s1; 43 e->left.sym = s1;
44 e->right.sym = s2; 44 e->right.sym = s2;
@@ -66,7 +66,7 @@ struct expr *expr_copy(const struct expr *org)
66 if (!org) 66 if (!org)
67 return NULL; 67 return NULL;
68 68
69 e = malloc(sizeof(*org)); 69 e = xmalloc(sizeof(*org));
70 memcpy(e, org, sizeof(*org)); 70 memcpy(e, org, sizeof(*org));
71 switch (org->type) { 71 switch (org->type) {
72 case E_SYMBOL: 72 case E_SYMBOL: