From patchwork Sun Apr 2 07:05:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arushi Singhal X-Patchwork-Id: 746127 X-Patchwork-Delegate: pablo@netfilter.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3vwmTd5fPtz9s73 for ; Sun, 2 Apr 2017 17:05:25 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="mUiAU+EJ"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750948AbdDBHFZ (ORCPT ); Sun, 2 Apr 2017 03:05:25 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:34609 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750936AbdDBHFY (ORCPT ); Sun, 2 Apr 2017 03:05:24 -0400 Received: by mail-pg0-f65.google.com with SMTP id o123so23891941pga.1 for ; Sun, 02 Apr 2017 00:05:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=sP03gXBp9LkI8tYT728HbmQ4e5oDH6HJRCSXOCbCVV4=; b=mUiAU+EJ9jwEOtS4BhMcNdSYin/vKyaNVUe+MH/xvBg49Ub4KZ3S3kWvYauHQvG7Do SVwZZ0LIJYEnJkxiRMPyvm8cS/gTgc6oiDXpKyb/ytVN13wLNVlznzi97EUp8Epbgl9x vpwuDF3fwKJIkIchWYtu0esZvcNapAB0v/RRi1J6JIJX2IWWUAiNsW2PyHncsM4v8nL3 3Ur3YcFwqXGrIYlnhT8HiiL7esb04gbchmdwMwn5/cEHgbBlXGKT9/24SLRCesvH50Gy 0n2RH1ePVQZ2WbzyFUkAlunUtH5HwETDRZ8b8rSZ0gUhw0jGk6bVluyQLLFoC5pmb/9T YHPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=sP03gXBp9LkI8tYT728HbmQ4e5oDH6HJRCSXOCbCVV4=; b=ShYQPjfOPGTcEeJnm+Hd8yQF3z2J7cdB5mVGBKXuDPTNRW6Ib14vW01Q7K6Hb9uzKK tSI+Gb9Q9bRq1Goj+D6+/HH+VFCpVIwmfJo2ZsWUzcgJWT1pDD41dKHIYtGtOuCKV9P1 D1gn3LluY+gDsSkw2GOJlZGtbgGQr29SBILw3jAwvALQE9AQLisCJhwWSDzhL6rHVgNs HkB2Z1E1Rrq8xJabvkmWHDb6vlGYjYnd6RH2ZENXylOAnjQ26iLvnaQYOGsfYM1hykGq aEXnCZtN0xpQXlah/x3U6TRLpNrw+NzvE+PFPM43lkvdIP/kV6bcR4Pi8z7WkBIC3q+N Ae1Q== X-Gm-Message-State: AFeK/H0VMwTMloXkpwmFV6SUnwRk3s3pGVynEq9ikP3ZOTyjdTxJa2vtlIyIDGQsZ9/Oiw== X-Received: by 10.98.4.66 with SMTP id 63mr10694030pfe.125.1491116724140; Sun, 02 Apr 2017 00:05:24 -0700 (PDT) Received: from arushi-HP-Pavilion-Notebook ([14.139.82.6]) by smtp.gmail.com with ESMTPSA id r17sm18945431pfa.13.2017.04.02.00.05.22 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 02 Apr 2017 00:05:22 -0700 (PDT) From: Arushi Singhal To: netfilter-devel@vger.kernel.org Cc: Arushi Singhal Subject: [PATCH 2/2] iptables: iptables: Constify option struct Date: Sun, 2 Apr 2017 12:35:08 +0530 Message-Id: <20170402070508.20770-2-arushisinghal19971997@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170402070508.20770-1-arushisinghal19971997@gmail.com> References: <20170402070508.20770-1-arushisinghal19971997@gmail.com> Sender: netfilter-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org The structs of the type option are not modified anywhere. Signed-off-by: Arushi Singhal --- iptables/ip6tables.c | 2 +- iptables/iptables-xml.c | 2 +- iptables/xtables-arp.c | 2 +- iptables/xtables-eb.c | 2 +- iptables/xtables.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/iptables/ip6tables.c b/iptables/ip6tables.c index 579d347..fd1c541 100644 --- a/iptables/ip6tables.c +++ b/iptables/ip6tables.c @@ -78,7 +78,7 @@ static const char optflags[] static const char unsupported_rev[] = " [unsupported revision]"; -static struct option original_opts[] = { +static const struct option original_opts[] = { {.name = "append", .has_arg = 1, .val = 'A'}, {.name = "delete", .has_arg = 1, .val = 'D'}, {.name = "check" , .has_arg = 1, .val = 'C'}, diff --git a/iptables/iptables-xml.c b/iptables/iptables-xml.c index 740a563..abe7bbe 100644 --- a/iptables/iptables-xml.c +++ b/iptables/iptables-xml.c @@ -38,7 +38,7 @@ static int verbose = 0; /* Whether to combine actions of sequential rules with identical conditions */ static int combine = 0; /* Keeping track of external matches and targets. */ -static struct option options[] = { +static const struct option options[] = { {"verbose", 0, NULL, 'v'}, {"combine", 0, NULL, 'c'}, {"help", 0, NULL, 'h'}, diff --git a/iptables/xtables-arp.c b/iptables/xtables-arp.c index 6aa000a..85feb48 100644 --- a/iptables/xtables-arp.c +++ b/iptables/xtables-arp.c @@ -107,7 +107,7 @@ static const char cmdflags[] = { 'I', 'D', 'D', 'R', 'A', 'L', 'F', 'Z', static const char optflags[NUMBER_OF_OPT] = { 'n', 's', 'd', 2, 3, 7, 8, 4, 5, 6, 'j', 'v', 'i', 'o', '0', 'c'}; -static struct option original_opts[] = { +static const struct option original_opts[] = { { "append", 1, 0, 'A' }, { "delete", 1, 0, 'D' }, { "insert", 1, 0, 'I' }, diff --git a/iptables/xtables-eb.c b/iptables/xtables-eb.c index c8b5d4f..60ec935 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 struct option ebt_original_options[] = +static const struct option ebt_original_options[] = { { "append" , required_argument, 0, 'A' }, { "insert" , required_argument, 0, 'I' }, diff --git a/iptables/xtables.c b/iptables/xtables.c index 286866f..636aa87 100644 --- a/iptables/xtables.c +++ b/iptables/xtables.c @@ -59,7 +59,7 @@ static const char cmdflags[] = { 'I', 'D', 'D', 'R', 'A', 'L', 'F', 'Z', static const char optflags[] = { 'n', 's', 'd', 'p', 'j', 'v', 'x', 'i', 'o', '0', 'c', 'f'}; -static struct option original_opts[] = { +static const struct option original_opts[] = { {.name = "append", .has_arg = 1, .val = 'A'}, {.name = "delete", .has_arg = 1, .val = 'D'}, {.name = "check", .has_arg = 1, .val = 'C'},