diff options
author | Andrew Tridgell <andrew@tridgell.net> | 2015-02-26 10:19:15 +1100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2015-02-26 08:22:23 +0100 |
commit | 8240e90d265b2d0572b1db8aee570da5912f050e (patch) | |
tree | 66992a9b9bb8c69e54cf53a02fb250e983f2e8ea /src/systemcmds/bl_update | |
parent | 59e623a2ebe28139dfed2a3df4a63f1999c50b1a (diff) | |
download | px4-firmware-8240e90d265b2d0572b1db8aee570da5912f050e.tar.gz px4-firmware-8240e90d265b2d0572b1db8aee570da5912f050e.tar.bz2 px4-firmware-8240e90d265b2d0572b1db8aee570da5912f050e.zip |
bl_update: fixed stat() check
Diffstat (limited to 'src/systemcmds/bl_update')
-rw-r--r-- | src/systemcmds/bl_update/bl_update.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/systemcmds/bl_update/bl_update.c b/src/systemcmds/bl_update/bl_update.c index ec9269d39..02d2d6f3c 100644 --- a/src/systemcmds/bl_update/bl_update.c +++ b/src/systemcmds/bl_update/bl_update.c @@ -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); -}
\ No newline at end of file +} |