aboutsummaryrefslogtreecommitdiff
path: root/scripts/dtc/dtc.c
diff options
context:
space:
mode:
authorTom Rini2017-09-23 17:30:53 -0400
committerTom Rini2017-09-23 17:33:06 -0400
commitd6fc90ced42e9fb77185cedfe45d0a2c7ac78508 (patch)
tree3f3e4982f1e5ab73569913be730c2fe9286a1b63 /scripts/dtc/dtc.c
parentc0e032e0090d6541549b19cc47e06ccd1f302893 (diff)
scripts/dtc: Update to upstream version v1.4.4
This adds the following commits from upstream: 558cd81bdd43 dtc: Bump version to v1.4.4 c17a811c62eb fdtput: Remove star from value_len documentation 194d5caaefcb fdtget: Use @return to document the return value d922ecdd017b tests: Make realloc_fdt() really allocate *fdt 921cc17fec29 libfdt: overlay: Check the value of the right variable 9ffdf60bf463 dtc: Simplify asm_emit_string() implementation 881012e44386 libfdt: Change names of sparse helper macros bad5b28049e5 Fix assorted sparse warnings 672ac09ea04d Clean up gcc attributes 49300f2ade6a dtc: Don't abuse struct fdt_reserve_entry Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'scripts/dtc/dtc.c')
-rw-r--r--scripts/dtc/dtc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/scripts/dtc/dtc.c b/scripts/dtc/dtc.c
index bb1e52b3181..f5eed9d72c0 100644
--- a/scripts/dtc/dtc.c
+++ b/scripts/dtc/dtc.c
@@ -138,7 +138,7 @@ static const char *guess_type_by_name(const char *fname, const char *fallback)
static const char *guess_input_format(const char *fname, const char *fallback)
{
struct stat statbuf;
- uint32_t magic;
+ fdt32_t magic;
FILE *f;
if (stat(fname, &statbuf) != 0)
@@ -159,8 +159,7 @@ static const char *guess_input_format(const char *fname, const char *fallback)
}
fclose(f);
- magic = fdt32_to_cpu(magic);
- if (magic == FDT_MAGIC)
+ if (fdt32_to_cpu(magic) == FDT_MAGIC)
return "dtb";
return guess_type_by_name(fname, fallback);