]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Avoid warning about impossible check for flags & 0
authorNick Mathewson <nickm@torproject.org>
Fri, 22 Nov 2013 17:42:05 +0000 (12:42 -0500)
committerNick Mathewson <nickm@torproject.org>
Fri, 22 Nov 2013 17:42:05 +0000 (12:42 -0500)
Fixes CID 743381

src/common/util.c

index 25490026c96d8505931b905867b8b7186c23cd0d..ae3f69b5e37181ee1eb59d371845141c94604b21 100644 (file)
@@ -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) {