diff --git a/dtc-parser.y b/dtc-parser.y index ade5dea..b2c45cd 100644 --- a/dtc-parser.y +++ b/dtc-parser.y @@ -88,7 +88,7 @@ propdef: label DT_PROPNAME '=' propdata ';' { $$ = build_property($2, $4, $1); } | label DT_PROPNAME ';' { - $$ = build_empty_property($2, $1); + $$ = build_property($2, empty_data, $1); } ; diff --git a/dtc.h b/dtc.h index 0a190d8..27a4852 100644 --- a/dtc.h +++ b/dtc.h @@ -156,7 +156,6 @@ struct node { for ((c) = (n)->children; (c); (c) = (c)->next_sibling) struct property *build_property(char *name, struct data val, char *label); -struct property *build_empty_property(char *name, char *label); struct property *chain_property(struct property *first, struct property *list); struct node *build_node(struct property *proplist, struct node *children); diff --git a/livetree.c b/livetree.c index 93387c4..6318689 100644 --- a/livetree.c +++ b/livetree.c @@ -38,19 +38,6 @@ struct property *build_property(char *name, struct data val, char *label) return new; } -struct property *build_empty_property(char *name, char *label) -{ - struct property *new = xmalloc(sizeof(*new)); - - new->name = name; - new->val = empty_data; - new->next = NULL; - - new->label = label; - - return new; -} - struct property *chain_property(struct property *first, struct property *list) { assert(first->next == NULL);