From ec4ad35cdc56f07e4af81f12a4851227c7c0db13 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Sun, 7 Dec 2014 20:24:22 +0100 Subject: [PATCH] Use parentheses around `&&` withing `||` While the current form is perfectly valid, using parentheses around `&&` would prevent future errors when modifiying the expression. --- argtable3.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/argtable3.c b/argtable3.c index 9e8d46b..0981da0 100644 --- a/argtable3.c +++ b/argtable3.c @@ -3412,10 +3412,10 @@ static const TRexChar *trex_matchnode(TRex* exp,TRexNode *node,const TRexChar *s return cur; } case OP_WB: - if(str == exp->_bol && !isspace(*str) - || (str == exp->_eol && !isspace(*(str-1))) - || (!isspace(*str) && isspace(*(str+1))) - || (isspace(*str) && !isspace(*(str+1))) ) { + if((str == exp->_bol && !isspace(*str)) + || ((str == exp->_eol && !isspace(*(str-1)))) + || ((!isspace(*str) && isspace(*(str+1)))) + || ((isspace(*str) && !isspace(*(str+1)))) ) { return (node->left == 'b')?str:NULL; } return (node->left == 'b')?NULL:str;