From: Paul Eggert Date: Tue, 6 Nov 2018 18:35:16 +0000 (-0800) Subject: sync: fix open fallback bug X-Git-Tag: v8.31~62 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=94d364f157f007f2b23c70863ac8eefe9b21229d;p=thirdparty%2Fcoreutils.git 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. --- diff --git a/src/sync.c b/src/sync.c index bd3671a19c..607fa8f7f4 100644 --- a/src/sync.c +++ b/src/sync.c @@ -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,