aboutsummaryrefslogtreecommitdiff
path: root/src/common/util.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2013-11-22 12:42:05 -0500
committerNick Mathewson <nickm@torproject.org>2013-11-22 12:42:05 -0500
commitacd8c4f868d1092472986052c66671e806371ffe (patch)
treefdf576c73deae1d78edaea0c2307dc49bbd49559 /src/common/util.c
parent23dae51976765271239205672c5bfc22472a9606 (diff)
downloadtor-acd8c4f868d1092472986052c66671e806371ffe.tar
tor-acd8c4f868d1092472986052c66671e806371ffe.tar.gz
Avoid warning about impossible check for flags & 0
Fixes CID 743381
Diffstat (limited to 'src/common/util.c')
-rw-r--r--src/common/util.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/common/util.c b/src/common/util.c
index 25490026c..ae3f69b5e 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -2066,8 +2066,10 @@ start_writing_to_file(const char *fname, int open_flags, int mode,
open_flags &= ~O_EXCL;
new_file->rename_on_close = 1;
}
+#if O_BINARY != 0
if (open_flags & O_BINARY)
new_file->binary = 1;
+#endif
new_file->fd = tor_open_cloexec(open_name, open_flags, mode);
if (new_file->fd < 0) {