Browse Source

Remove build_empty_property(). It wasn't useful.

main
David Gibson 20 years ago
parent
commit
9ad4587c90
  1. 2
      dtc-parser.y
  2. 1
      dtc.h
  3. 13
      livetree.c

2
dtc-parser.y

@ -88,7 +88,7 @@ propdef: label DT_PROPNAME '=' propdata ';' { @@ -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

@ -156,7 +156,6 @@ struct node { @@ -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);

13
livetree.c

@ -38,19 +38,6 @@ struct property *build_property(char *name, struct data val, char *label) @@ -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);

Loading…
Cancel
Save