diff options
author | 2022-07-22 12:02:57 +0100 | |
---|---|---|
committer | 2022-07-25 06:41:04 +0100 | |
commit | 09bf0ed096de15c17aecd59d33094b0f5d1a4f05 (patch) | |
tree | 5206a8bc1b09a036ab46a094ff12fe88f6ea323f | |
parent | 11f671ae84ff775a9dcefc747271247b5f361e7d (diff) |
Fix 'make check' target so it builds.
Test: make check
Test: build android
Change-Id: I8e998651402f8243ee4d222a5a2518adeeb4ace7
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | libfdt/acpi.c | 7 |
3 files changed, 7 insertions, 5 deletions
@@ -9,6 +9,7 @@ lex.yy.c *.lex.c .*.swp +dtc-parser.h /dtc /fdtdump /convert-dtsv0 @@ -381,4 +381,8 @@ clean: libfdt_clean pylibfdt_clean tests_clean @$(VECHO) BISON $@ $(BISON) -b $(basename $(basename $@)) -d $< +# Some checks expect dtc-parser.h, so create link +dtc-parser.h: dtc-parser.tab.h + ln -s $^ $@ + FORCE: diff --git a/libfdt/acpi.c b/libfdt/acpi.c index ba51734..5869726 100644 --- a/libfdt/acpi.c +++ b/libfdt/acpi.c @@ -31,13 +31,10 @@ #include "libacpi.h" uint8_t acpi_csum(const void *base, int n) { - uint8_t *p; - uint8_t sum; + const uint8_t *p = base; + uint8_t sum = 0; int bytesDone; - p = (uint8_t*)base; - - sum = 0; for (bytesDone = 0; bytesDone < n; bytesDone++) { sum += *p; p++; |