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