diff options
| author | Takashi Iwai <tiwai@suse.de> | 2011-08-15 12:47:19 +0200 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2011-08-15 12:47:19 +0200 |
| commit | 2d9f8a6e73ef2ec8ecaa24ca98e7010d6edd089f (patch) | |
| tree | 9ea035b696137b345c69532a318f55502f530558 /scripts/kconfig/expr.c | |
| parent | ecf726f5414489fe749477eb77d6cb12bb93c8bc (diff) | |
| parent | eade7b281c9fc18401b989c77d5e5e660b25a3b7 (diff) | |
Merge branch 'fix/hda' into topic/hda
Diffstat (limited to 'scripts/kconfig/expr.c')
| -rw-r--r-- | scripts/kconfig/expr.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/scripts/kconfig/expr.c b/scripts/kconfig/expr.c index 001003452f68..290ce41f8ba4 100644 --- a/scripts/kconfig/expr.c +++ b/scripts/kconfig/expr.c @@ -7,15 +7,13 @@ #include <stdlib.h> #include <string.h> -#define LKC_DIRECT_LINK #include "lkc.h" #define DEBUG_EXPR 0 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; @@ -23,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; @@ -32,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; @@ -42,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; |
