sync: fix open fallback bug

Problem caught by Coverity Analysis
and reported by Kamil Dudka (Bug#33287).
* src/sync.c (sync_arg): Fix typo in fallback code.
This commit is contained in:
Paul Eggert
2018-11-06 10:35:16 -08:00
parent 806b0d1580
commit 94d364f157

View File

@@ -111,8 +111,10 @@ sync_arg (enum sync_mode mode, char const *file)
if (open_flags != (O_WRONLY | O_NONBLOCK))
fd = open (file, O_WRONLY | O_NONBLOCK);
if (fd < 0)
error (0, rd_errno, _("error opening %s"), quoteaf (file));
return false;
{
error (0, rd_errno, _("error opening %s"), quoteaf (file));
return false;
}
}
/* We used O_NONBLOCK above to not hang with fifos,