[PATCH 2/4] iterator: Add missing parentheses

Rosen Penev rosenp at gmail.com
Sat Aug 3 01:55:56 UTC 2019


Clang warns:

warning: '&&' within '||' [-Wlogical-op-parentheses]
return sbuf == b.sbuf || is_eof() && b.is_eof();

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 include/iterator | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/iterator b/include/iterator
index d65f467..3348d85 100644
--- a/include/iterator
+++ b/include/iterator
@@ -164,7 +164,7 @@ namespace std{
 		}
 
 		bool equal(const istreambuf_iterator& b) const{
-			return sbuf == b.sbuf || is_eof() && b.is_eof();
+			return sbuf == b.sbuf || (is_eof() && b.is_eof());
 		}
 	private:
 		streambuf_type* sbuf;
-- 
2.17.1



More information about the uClibc mailing list