Browse Source

Use parentheses around `&&` withing `||`

While the current form is perfectly valid, using parentheses around `&&`
would prevent future errors when modifiying the expression.
pull/4/head
Vincent Bernat 10 years ago
parent
commit
ec4ad35cdc
  1. 8
      argtable3.c

8
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;

Loading…
Cancel
Save