This patch fixes Smatch static checker warning:
test/cmd/mbr.c:243 mbr_test_run()
warn: sizeof(NUMBER)?
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Alexander Gendin <agendin@matrox.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
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) +