[PATCH libnftnl] tests: change char * pointer to constant (const char *)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux