iptables: extensions: Remove unnecessary parenthesis.
PATCH 1/1 iptables: extensions: Remove unnecessary parenthesis.
Removed parenthesis on the right hand side of assignment, as they are not required.
The following coccinelle script was used to fix this issue:
@@
local idexpression id;
expression e;
@@
id =
-(
e
-)
Signed-off-by Arushi Singhal <[email protected]>
--- extensions/libebt_mark.c | 8 ++++---- extensions/libxt_string.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-)
extensions/libebt_mark.c +4 -4
@@ -86,7 +86,7 @@ brmark_parse(int c, char **argv, int invert, unsigned int *flags,return 1 ;case MARK_SETMARK :EBT_CHECK_OPTION (flags,OPT_MARK_SETMARK ); - mask = (OPT_MARK_ORMARK |OPT_MARK_ANDMARK |OPT_MARK_XORMARK ); + mask =OPT_MARK_ORMARK |OPT_MARK_ANDMARK |OPT_MARK_XORMARK ;if (*flags & mask)xtables_error (PARAMETER_PROBLEM , "--mark-set cannot be used together with"
@@ -96,7 +96,7 @@ brmark_parse(int c, char **argv, int invert, unsigned int *flags,break ;case MARK_ORMARK :EBT_CHECK_OPTION (flags,OPT_MARK_ORMARK ); - mask = (OPT_MARK_SETMARK |OPT_MARK_ANDMARK |OPT_MARK_XORMARK ); + mask =OPT_MARK_SETMARK |OPT_MARK_ANDMARK |OPT_MARK_XORMARK ;if (*flags & mask)xtables_error (PARAMETER_PROBLEM , "--mark-or cannot be used together with"
@@ -106,7 +106,7 @@ brmark_parse(int c, char **argv, int invert, unsigned int *flags,break ;case MARK_ANDMARK :EBT_CHECK_OPTION (flags,OPT_MARK_ANDMARK ); - mask = (OPT_MARK_SETMARK |OPT_MARK_ORMARK |OPT_MARK_XORMARK ); + mask =OPT_MARK_SETMARK |OPT_MARK_ORMARK |OPT_MARK_XORMARK ;if (*flags & mask)xtables_error (PARAMETER_PROBLEM , "--mark-and cannot be used together with"
@@ -116,7 +116,7 @@ brmark_parse(int c, char **argv, int invert, unsigned int *flags,break ;case MARK_XORMARK :EBT_CHECK_OPTION (flags,OPT_MARK_XORMARK ); - mask = (OPT_MARK_SETMARK |OPT_MARK_ANDMARK |OPT_MARK_ORMARK ); + mask =OPT_MARK_SETMARK |OPT_MARK_ANDMARK |OPT_MARK_ORMARK ;if (*flags & mask)xtables_error (PARAMETER_PROBLEM , "--mark-xor cannot be used together with"
extensions/libxt_string.c +4 -4
@@ -255,8 +255,8 @@ string_print(const void *ip, const struct xt_entry_match *match, int numeric)const struct xt_string_info *info = (const struct xt_string_info *) match->data;const int revision = match->u.user.revision; -int invert = (revision ==0 ? info->u.v0.invert : - info->u.v1.flags &XT_STRING_FLAG_INVERT ); +int invert = revision ==0 ? info->u.v0.invert : + info->u.v1.flags &XT_STRING_FLAG_INVERT ;if (is_hex_string (info->pattern, info->patlen)) {printf (" STRING match %s" , invert ?"!" :"" );
@@ -279,8 +279,8 @@ static void string_save(const void *ip, const struct xt_entry_match *match)const struct xt_string_info *info = (const struct xt_string_info *) match->data;const int revision = match->u.user.revision; -int invert = (revision ==0 ? info->u.v0.invert : - info->u.v1.flags &XT_STRING_FLAG_INVERT ); +int invert = revision ==0 ? info->u.v0.invert : + info->u.v1.flags &XT_STRING_FLAG_INVERT ;if (is_hex_string (info->pattern, info->patlen)) {printf ("%s --hex-string" , (invert) ?" !" :"" );
Signature · 1 line
2.11.0