diff options
author | Michal Marek <mmarek@suse.cz> | 2011-07-04 11:24:10 +0200 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2011-07-04 11:24:10 +0200 |
commit | 5c74cd4cc7e7ad9117789e0ca22892a42f87d890 (patch) | |
tree | 139e419539a43b759cecb3fed618f8c1a6cce556 /scripts/kconfig/expr.c | |
parent | e54e692ba613c2170c66ce36a3791c009680af08 (diff) | |
parent | ab63f58f253c3eca620347f5180ca3d6a1b6aa38 (diff) | |
download | lwn-5c74cd4cc7e7ad9117789e0ca22892a42f87d890.tar.gz lwn-5c74cd4cc7e7ad9117789e0ca22892a42f87d890.zip |
Merge branch 'kconfig-trivial' of git://github.com/lacombar/linux-2.6 into kbuild/kconfig
Diffstat (limited to 'scripts/kconfig/expr.c')
-rw-r--r-- | scripts/kconfig/expr.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/scripts/kconfig/expr.c b/scripts/kconfig/expr.c index 792c62ed9d63..290ce41f8ba4 100644 --- a/scripts/kconfig/expr.c +++ b/scripts/kconfig/expr.c @@ -13,8 +13,7 @@ struct expr *expr_alloc_symbol(struct symbol *sym) { - struct expr *e = malloc(sizeof(*e)); - memset(e, 0, sizeof(*e)); + struct expr *e = calloc(1, sizeof(*e)); e->type = E_SYMBOL; e->left.sym = sym; return e; @@ -22,8 +21,7 @@ struct expr *expr_alloc_symbol(struct symbol *sym) struct expr *expr_alloc_one(enum expr_type type, struct expr *ce) { - struct expr *e = malloc(sizeof(*e)); - memset(e, 0, sizeof(*e)); + struct expr *e = calloc(1, sizeof(*e)); e->type = type; e->left.expr = ce; return e; @@ -31,8 +29,7 @@ struct expr *expr_alloc_one(enum expr_type type, struct expr *ce) struct expr *expr_alloc_two(enum expr_type type, struct expr *e1, struct expr *e2) { - struct expr *e = malloc(sizeof(*e)); - memset(e, 0, sizeof(*e)); + struct expr *e = calloc(1, sizeof(*e)); e->type = type; e->left.expr = e1; e->right.expr = e2; @@ -41,8 +38,7 @@ struct expr *expr_alloc_two(enum expr_type type, struct expr *e1, struct expr *e struct expr *expr_alloc_comp(enum expr_type type, struct symbol *s1, struct symbol *s2) { - struct expr *e = malloc(sizeof(*e)); - memset(e, 0, sizeof(*e)); + struct expr *e = calloc(1, sizeof(*e)); e->type = type; e->left.sym = s1; e->right.sym = s2; |