summaryrefslogtreecommitdiff
path: root/test/cmd
diff options
context:
space:
mode:
authorAlexander Gendin <[email protected]>2024-02-03 02:56:19 +0000
committerTom Rini <[email protected]>2024-03-02 12:25:20 -0500
commit8904e933a3aa01a2559d38e081703ed6fd92807d (patch)
tree52bfe57ea5ea39a433caa1b2a0c9e3b9e6aca306 /test/cmd
parent1fa38ca9aae45aca58e9394a121bec6baa166f31 (diff)
test: cmd: mbr: Fix Smatch static checker warning
This patch fixes Smatch static checker warning: test/cmd/mbr.c:243 mbr_test_run() warn: sizeof(NUMBER)? Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Alexander Gendin <[email protected]> Reviewed-by: Heinrich Schuchardt <[email protected]>
Diffstat (limited to 'test/cmd')
-rw-r--r--test/cmd/mbr.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/cmd/mbr.c b/test/cmd/mbr.c
index 46b78e706ca..235b363290e 100644
--- a/test/cmd/mbr.c
+++ b/test/cmd/mbr.c
@@ -240,7 +240,11 @@ static int mbr_test_run(struct unit_test_state *uts)
ut_assert(ofnode_valid(node));
ut_assertok(lists_bind_fdt(gd->dm_root, node, &dev, NULL, false));
- mbr_parts_max = sizeof('\0') + 2 +
+ /*
+ * 1 byte for null character
+ * 2 reserved bytes
+ */
+ mbr_parts_max = 1 + 2 +
strlen(mbr_parts_header) +
strlen(mbr_parts_p1) +
strlen(mbr_parts_p2) +