Remove build_empty_property(). It wasn't useful.

main
David Gibson 2005-06-17 14:32:32 +10:00
parent 81f2e89c75
commit 9ad4587c90
3 changed files with 1 additions and 15 deletions

View File

@ -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);
}
;


1
dtc.h
View File

@ -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);

View File

@ -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);