mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-26 20:33:35 +08:00
bl_update: fixed stat() check
This commit is contained in:
committed by
Lorenz Meier
parent
59e623a2eb
commit
8240e90d26
@@ -74,7 +74,7 @@ bl_update_main(int argc, char *argv[])
|
|||||||
|
|
||||||
struct stat s;
|
struct stat s;
|
||||||
|
|
||||||
if (!stat(argv[1], &s))
|
if (stat(argv[1], &s) != 0)
|
||||||
err(1, "stat %s", argv[1]);
|
err(1, "stat %s", argv[1]);
|
||||||
|
|
||||||
/* sanity-check file size */
|
/* sanity-check file size */
|
||||||
@@ -214,4 +214,4 @@ setopt(void)
|
|||||||
|
|
||||||
errx(1, "option bits setting failed; readback 0x%04x", *optcr);
|
errx(1, "option bits setting failed; readback 0x%04x", *optcr);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user