[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Avoid warning about impossible check for flags & 0



commit acd8c4f868d1092472986052c66671e806371ffe
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Fri Nov 22 12:42:05 2013 -0500

    Avoid warning about impossible check for flags & 0
    
    Fixes CID 743381
---
 src/common/util.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/common/util.c b/src/common/util.c
index 2549002..ae3f69b 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) {

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits