X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=tools%2Flib%2Fcarlfw.c;h=44897e39ef8ee07a1c0b464a1cc7857f303bb854;hb=3fe042ff62f66381315edd486d8f7ef0369e3e58;hp=b75253558cfcfacafb1360849f86067d4127a17c;hpb=1b87ea4a51988adea4d112ada0cb749c8059353c;p=carl9170fw.git diff --git a/tools/lib/carlfw.c b/tools/lib/carlfw.c index b752535..44897e3 100644 --- a/tools/lib/carlfw.c +++ b/tools/lib/carlfw.c @@ -190,18 +190,18 @@ static void *__carlfw_find_desc(struct carlfw_file *file, struct carl9170fw_desc_head *tmp = NULL; while (scan >= 0) { - if (file->data[scan] == descid[sizeof(descid) - found - 1]) + if (file->data[scan] == descid[CARL9170FW_MAGIC_SIZE - found - 1]) found++; else found = 0; - if (found == sizeof(descid)) + if (found == CARL9170FW_MAGIC_SIZE) break; scan--; } - if (found == sizeof(descid)) { + if (found == CARL9170FW_MAGIC_SIZE) { tmp = (void *) &file->data[scan]; if (!CHECK_HDR_VERSION(tmp, compatible_revision) &&