[PATCH 2/4] iterator: Add missing parentheses

Rosen Penev <[email protected]> Fri, 2 Aug 2019 18:55:56 -0700
Newsgroups gmane.comp.lib.uclibc.general
Message-ID <[email protected]>
Clang warns:

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

Signed-off-by: Rosen Penev <[email protected]>
---
 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