diff options
author | Rob Herring <robh@kernel.org> | 2015-04-29 16:00:05 -0500 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2015-04-29 17:17:27 -0500 |
commit | 4760597116e34bd58f670d008ae7323653268fb4 (patch) | |
tree | 2b27799a1dfc5171c7d502cb2ffe094d93ecf7f8 /scripts/dtc/data.c | |
parent | f1ec7187167ce225d2744b20a90afef5f10fd6cd (diff) | |
download | op-kernel-dev-4760597116e34bd58f670d008ae7323653268fb4.zip op-kernel-dev-4760597116e34bd58f670d008ae7323653268fb4.tar.gz |
scripts/dtc: Update to upstream version 9d3649bd3be245c9
Sync dtc with upstream as of commit 9d3649bd3be2 (Add testcases for
fdt_path_offset_namelen()).
Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: devicetree@vger.kernel.org
Diffstat (limited to 'scripts/dtc/data.c')
-rw-r--r-- | scripts/dtc/data.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/dtc/data.c b/scripts/dtc/data.c index 4a40c5b..8cae237 100644 --- a/scripts/dtc/data.c +++ b/scripts/dtc/data.c @@ -74,7 +74,7 @@ struct data data_copy_escape_string(const char *s, int len) struct data d; char *q; - d = data_grow_for(empty_data, strlen(s)+1); + d = data_grow_for(empty_data, len + 1); q = d.val; while (i < len) { @@ -250,20 +250,20 @@ struct data data_add_marker(struct data d, enum markertype type, char *ref) return data_append_markers(d, m); } -int data_is_one_string(struct data d) +bool data_is_one_string(struct data d) { int i; int len = d.len; if (len == 0) - return 0; + return false; for (i = 0; i < len-1; i++) if (d.val[i] == '\0') - return 0; + return false; if (d.val[len-1] != '\0') - return 0; + return false; - return 1; + return true; } |