netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Harsha Sharma <harshasharmaiitr@gmail.com>
To: pablo@netfilter.org, harshasharmaiitr@gmail.com
Cc: netfilter-devel@vger.kernel.org
Subject: [PATCH libnftnl] tests: change char * pointer to constant (const char *)
Date: Fri, 29 Dec 2017 12:19:39 +0530	[thread overview]
Message-ID: <20171229064939.30699-1-harshasharmaiitr@gmail.com> (raw)

As the parameter for function is pointer to constant, change it to
constant. This fix compilation warning in libnftnl with make check.

Signed-off-by: Harsha Sharma <harshasharmaiitr@gmail.com>
---
 tests/nft-expr_immediate-test.c | 4 ++--
 tests/nft-expr_lookup-test.c    | 2 +-
 tests/nft-expr_objref-test.c    | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/nft-expr_immediate-test.c b/tests/nft-expr_immediate-test.c
index 60a1450..c25eedb 100644
--- a/tests/nft-expr_immediate-test.c
+++ b/tests/nft-expr_immediate-test.c
@@ -71,8 +71,8 @@ int main(int argc, char *argv[])
 	char buf[4096];
 	struct nftnl_expr_iter *iter_a, *iter_b;
 	struct nftnl_expr *rule_a, *rule_b;
-	char *chain = "tests_chain01234";
-	char *data = "test_data_01234";
+	const char *chain = "tests_chain01234";
+	const char *data = "test_data_01234";
 
 	a = nftnl_rule_alloc();
 	b = nftnl_rule_alloc();
diff --git a/tests/nft-expr_lookup-test.c b/tests/nft-expr_lookup-test.c
index 28c1204..9e6e051 100644
--- a/tests/nft-expr_lookup-test.c
+++ b/tests/nft-expr_lookup-test.c
@@ -59,7 +59,7 @@ int main(int argc, char *argv[])
 	char buf[4096];
 	struct nftnl_expr_iter *iter_a, *iter_b;
 	struct nftnl_expr *rule_a, *rule_b;
-	char *lookup_set = "test_set_01243";
+	const char *lookup_set = "test_set_01243";
 
 	a = nftnl_rule_alloc();
 	b = nftnl_rule_alloc();
diff --git a/tests/nft-expr_objref-test.c b/tests/nft-expr_objref-test.c
index ae4da9a..08e27ce 100644
--- a/tests/nft-expr_objref-test.c
+++ b/tests/nft-expr_objref-test.c
@@ -46,7 +46,7 @@ int main(int argc, char *argv[])
 	char buf[4096];
 	struct nftnl_expr_iter *iter_a, *iter_b;
 	struct nftnl_expr *rule_a, *rule_b;
-	char *name = "test_set_01243";
+	const char *name = "test_set_01243";
 
 	a = nftnl_rule_alloc();
 	b = nftnl_rule_alloc();
-- 
2.11.0


             reply	other threads:[~2017-12-29  6:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-29  6:49 Harsha Sharma [this message]
2017-12-30 20:59 ` [PATCH libnftnl] tests: change char * pointer to constant (const char *) Pablo Neira Ayuso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171229064939.30699-1-harshasharmaiitr@gmail.com \
    --to=harshasharmaiitr@gmail.com \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).