aboutsummaryrefslogtreecommitdiff
path: root/tests/dtbs_equal_ordered.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2007-11-19 17:26:22 +1100
committerJon Loeliger <jdl@freescale.com>2007-11-20 09:01:29 -0600
commit2cf86939aff2692098396e7f25ce299e7195fa12 (patch)
tree210a3ec9de082e9882d91acb1d0702d7f83a2ece /tests/dtbs_equal_ordered.c
parent9521dc5ecc66c158cd6853cabba2c29f545780f6 (diff)
downloaddtc-2cf86939aff2692098396e7f25ce299e7195fa12.zip
dtc-2cf86939aff2692098396e7f25ce299e7195fa12.tar.gz
dtc-2cf86939aff2692098396e7f25ce299e7195fa12.tar.bz2
libfdt: Abolish fdt_offset_ptr_typed()
The fdt_offset_ptr_typed() macro seemed like a good idea at the time. However, it's not actually used all that often, it can silently throw away const qualifications and it uses a gcc extension (typeof) which I'd prefer to avoid for portability. Therefore, this patch gets rid of it (and the fdt_offset_ptr_typed_w() variant which was never used at all). It also makes a few variables const in testcases, which always should have been const, but weren't caught before because of the aforementioned silent discards. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'tests/dtbs_equal_ordered.c')
-rw-r--r--tests/dtbs_equal_ordered.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/dtbs_equal_ordered.c b/tests/dtbs_equal_ordered.c
index d72124f..0c30ad3 100644
--- a/tests/dtbs_equal_ordered.c
+++ b/tests/dtbs_equal_ordered.c
@@ -93,10 +93,10 @@ void compare_structure(const void *fdt1, const void *fdt2)
break;
case FDT_PROP:
- prop1 = fdt_offset_ptr_typed(fdt1, offset1, prop1);
+ prop1 = fdt_offset_ptr(fdt1, offset1, sizeof(*prop1));
if (!prop1)
FAIL("Could get fdt1 property at %d", offset1);
- prop2 = fdt_offset_ptr_typed(fdt2, offset2, prop2);
+ prop2 = fdt_offset_ptr(fdt2, offset2, sizeof(*prop2));
if (!prop2)
FAIL("Could get fdt2 property at %d", offset2);