--- zzzz-none-000/linux-2.6.39.4/scripts/kconfig/expr.c 2011-08-03 19:43:28.000000000 +0000 +++ puma6-arm-6490-729/linux-2.6.39.4/scripts/kconfig/expr.c 2021-11-10 13:23:11.000000000 +0000 @@ -7,15 +7,13 @@ #include #include -#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_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_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_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;