diff --git a/sbin/savecore/savecore.c b/sbin/savecore/savecore.c index bd9d2e47e98..4655818a63e 100644 --- a/sbin/savecore/savecore.c +++ b/sbin/savecore/savecore.c @@ -258,7 +258,7 @@ writebounds(int savedirfd, int bounds) FILE *fp; if ((fp = xfopenat(savedirfd, "bounds", O_WRONLY | O_CREAT | O_TRUNC, - "w", 0644)) < 0) { + "w", 0644)) == NULL) { logmsg(LOG_WARNING, "unable to write to bounds file: %m"); return; }