summaryrefslogtreecommitdiffstats
path: root/support/kconfig/expr.c
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2013-04-04 11:24:24 +0000
committerPeter Korsgaard <jacmet@sunsite.dk>2013-04-11 09:30:39 +0200
commit6997e461fdb39985957d24d81e612113cf39e35c (patch)
tree096947e214caf457ffdb005522698f3e747ad08a /support/kconfig/expr.c
parentcfe70c5e13fcf6d99394c646c758236a79041653 (diff)
downloadbuildroot-novena-6997e461fdb39985957d24d81e612113cf39e35c.tar.gz
buildroot-novena-6997e461fdb39985957d24d81e612113cf39e35c.zip
support/kconfig: upgrade to 3.9-rc2
Our kconfig code is updated to the version of kernel 3.9-rc2. No major issues during the migration, except: * Some conflicts when applying 03-change-config-option-prefix.patch due to upstream kernel changes. * The need of adding a new patch, 15-fix-qconf-moc-rule.patch, to fix the make rule that generates the moc file for the Qt-based interface. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Acked-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Tested-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'support/kconfig/expr.c')
-rw-r--r--support/kconfig/expr.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/support/kconfig/expr.c b/support/kconfig/expr.c
index c5182f4d4..bf776b6e9 100644
--- a/support/kconfig/expr.c
+++ b/support/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 = xcalloc(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 = xcalloc(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 = xcalloc(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 = xcalloc(1, sizeof(*e));
e->type = type;
e->left.sym = s1;
e->right.sym = s2;
@@ -71,7 +66,7 @@ struct expr *expr_copy(const struct expr *org)
if (!org)
return NULL;
- e = malloc(sizeof(*org));
+ e = xmalloc(sizeof(*org));
memcpy(e, org, sizeof(*org));
switch (org->type) {
case E_SYMBOL: