diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2007-12-04 11:49:43 +1100 |
---|---|---|
committer | Jon Loeliger <jdl@freescale.com> | 2007-12-04 07:27:08 -0600 |
commit | 2d72816ccfdcfd8039ab0b8883f9eeac895984bb (patch) | |
tree | 35fce1e48325e1bc495d07e5b209cbcc48ac1e24 /dtc.c | |
parent | 2b7dc8dce549ad72ad437b254bf756d7ba4c2a5a (diff) | |
download | device-tree-compiler-2d72816ccfdcfd8039ab0b8883f9eeac895984bb.tar.gz |
dtc: Fix uninitialized use of structure_ok
My rework of the tree checking code introduced a potentially nasty bug
- it uses the structure_ok variable uninitialized. This patch fixes
the problem. It's a fairly ugly bandaid approach, but the ugly will
disappear once future patches have folded the semantic checks into the
new framework.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'dtc.c')
-rw-r--r-- | dtc.c | 13 |
1 files changed, 1 insertions, 12 deletions
@@ -122,7 +122,6 @@ int main(int argc, char *argv[]) FILE *outf = NULL; int outversion = DEFAULT_FDT_VERSION; int boot_cpuid_phys = 0xfeedbeef; - int structure_ok; quiet = 0; reservenum = 0; @@ -205,17 +204,7 @@ int main(int argc, char *argv[]) if (! bi || ! bi->dt) die("Couldn't read input tree\n"); - process_checks(force, bi->dt); - - if (check) { - if (!structure_ok) { - fprintf(stderr, "Warning: Skipping semantic checks due to structural errors\n"); - } else { - if (!check_semantics(bi->dt, outversion, - boot_cpuid_phys)) - fprintf(stderr, "Warning: Input tree has semantic errors\n"); - } - } + process_checks(force, bi, check, outversion, boot_cpuid_phys); if (streq(outname, "-")) { outf = stdout; |