diff mbox series

iptables: xtables-eb: Remove const qualifier from struct option

Message ID 20171130134806.21737-1-rvarsha016@gmail.com
State Accepted
Delegated to: Pablo Neira
Headers show
Series iptables: xtables-eb: Remove const qualifier from struct option | expand

Commit Message

Varsha Rao Nov. 30, 2017, 1:48 p.m. UTC
As opts is reassigned multiple times, it cannot be made constant.
So remove const qualifier from structure option. This patch fixes the
following warning.

xtables-eb.c: In function ‘ebt_load_match_extensions’:
xtables-eb.c:653:7: warning: assignment discards ‘const’ qualifier
from pointer target type
  opts = ebt_original_options;

Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
---
 iptables/xtables-eb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Pablo Neira Ayuso Nov. 30, 2017, 2:03 p.m. UTC | #1
On Thu, Nov 30, 2017 at 07:18:05PM +0530, Varsha Rao wrote:
> As opts is reassigned multiple times, it cannot be made constant.
> So remove const qualifier from structure option. This patch fixes the
> following warning.
> 
> xtables-eb.c: In function ‘ebt_load_match_extensions’:
> xtables-eb.c:653:7: warning: assignment discards ‘const’ qualifier
> from pointer target type
>   opts = ebt_original_options;

Applied, thanks Varsha.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox series

Patch

diff --git a/iptables/xtables-eb.c b/iptables/xtables-eb.c
index 60ec935c..c8b5d4f3 100644
--- a/iptables/xtables-eb.c
+++ b/iptables/xtables-eb.c
@@ -247,7 +247,7 @@  static int get_current_chain(const char *chain)
 
 /* Default command line options. Do not mess around with the already
  * assigned numbers unless you know what you are doing */
-static const struct option ebt_original_options[] =
+static struct option ebt_original_options[] =
 {
 	{ "append"         , required_argument, 0, 'A' },
 	{ "insert"         , required_argument, 0, 'I' },