diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2007-12-04 14:26:15 +1100 |
---|---|---|
committer | Jon Loeliger <jdl@freescale.com> | 2007-12-04 07:54:03 -0600 |
commit | 92cb9a25b1a9117f4dacb0bce8c16b90b73b8698 (patch) | |
tree | fee6764026b45208e0f11e5066930b002b307e14 /livetree.c | |
parent | 2d72816ccfdcfd8039ab0b8883f9eeac895984bb (diff) | |
download | dtc-92cb9a25b1a9117f4dacb0bce8c16b90b73b8698.tar.gz |
dtc: Add many const qualifications
This adds 'const' qualifiers to many variables and functions. In
particular it's now used for passing names to the tree accesor
functions.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'livetree.c')
-rw-r--r-- | livetree.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -180,7 +180,7 @@ struct boot_info *build_boot_info(struct reserve_info *reservelist, * Tree accessor functions */ -char *get_unitname(struct node *node) +const char *get_unitname(struct node *node) { if (node->name[node->basenamelen] == '\0') return ""; @@ -188,7 +188,7 @@ char *get_unitname(struct node *node) return node->name + node->basenamelen + 1; } -struct property *get_property(struct node *node, char *propname) +struct property *get_property(struct node *node, const char *propname) { struct property *prop; @@ -205,7 +205,7 @@ cell_t propval_cell(struct property *prop) return be32_to_cpu(*((cell_t *)prop->val.val)); } -struct node *get_subnode(struct node *node, char *nodename) +struct node *get_subnode(struct node *node, const char *nodename) { struct node *child; @@ -216,9 +216,9 @@ struct node *get_subnode(struct node *node, char *nodename) return NULL; } -struct node *get_node_by_path(struct node *tree, char *path) +struct node *get_node_by_path(struct node *tree, const char *path) { - char *p; + const char *p; struct node *child; if (!path || ! (*path)) @@ -275,7 +275,7 @@ struct node *get_node_by_phandle(struct node *tree, cell_t phandle) return NULL; } -struct node *get_node_by_ref(struct node *tree, char *ref) +struct node *get_node_by_ref(struct node *tree, const char *ref) { if (ref[0] == '/') return get_node_by_path(tree, ref); |