aboutsummaryrefslogtreecommitdiff
path: root/treesource.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2007-12-04 14:26:15 +1100
committerJon Loeliger <jdl@freescale.com>2007-12-04 07:54:03 -0600
commit92cb9a25b1a9117f4dacb0bce8c16b90b73b8698 (patch)
treefee6764026b45208e0f11e5066930b002b307e14 /treesource.c
parent2d72816ccfdcfd8039ab0b8883f9eeac895984bb (diff)
downloaddtc-92cb9a25b1a9117f4dacb0bce8c16b90b73b8698.zip
dtc-92cb9a25b1a9117f4dacb0bce8c16b90b73b8698.tar.gz
dtc-92cb9a25b1a9117f4dacb0bce8c16b90b73b8698.tar.bz2
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 'treesource.c')
-rw-r--r--treesource.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/treesource.c b/treesource.c
index 202b8a7..a6a7767 100644
--- a/treesource.c
+++ b/treesource.c
@@ -58,7 +58,7 @@ int isstring(char c)
static void write_propval_string(FILE *f, struct data val)
{
- char *str = val.val;
+ const char *str = val.val;
int i;
int newchunk = 1;
struct marker *m = val.markers;
@@ -161,7 +161,7 @@ static void write_propval_cells(FILE *f, struct data val)
static void write_propval_bytes(FILE *f, struct data val)
{
void *propend = val.val + val.len;
- char *bp = val.val;
+ const char *bp = val.val;
struct marker *m = val.markers;
fprintf(f, "[");
@@ -189,7 +189,7 @@ static void write_propval_bytes(FILE *f, struct data val)
static void write_propval(FILE *f, struct property *prop)
{
int len = prop->val.len;
- char *p = prop->val.val;
+ const char *p = prop->val.val;
struct marker *m = prop->val.markers;
int nnotstring = 0, nnul = 0;
int nnotstringlbl = 0, nnotcelllbl = 0;