[git commit] iterator: Add missing parentheses

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Fri Oct 4 10:31:46 UTC 2019


commit: https://git.uclibc.org/uClibc++/commit/?id=0dd45c2d767f80d9f194c100a3eb5e5c5e919ec0
branch: https://git.uclibc.org/uClibc++/commit/?id=refs/heads/master

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>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop 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;


More information about the uClibc-cvs mailing list