bl_update: fixed stat() check

This commit is contained in:
Andrew Tridgell 2015-02-26 10:19:15 +11:00 committed by Lorenz Meier
parent 59e623a2eb
commit 8240e90d26

View File

@ -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);
}
}