mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2025-09-10 07:59:52 +02:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user