summaryrefslogtreecommitdiff
path: root/lib/librte_acl
diff options
context:
space:
mode:
authorStephen Hemminger <stephen@networkplumber.org>2014-06-24 11:15:28 -0700
committerThomas Monjalon <thomas.monjalon@6wind.com>2014-06-27 02:31:24 +0200
commit6f41fe75e2dd8dd38f7bea7b9501edd4f9b72fa5 (patch)
tree38546261dbaf75edcf31bc3ccdad61f84f666590 /lib/librte_acl
parente8ed6c78177fbbafa326d9efc590a51705848200 (diff)
downloaddpdk-6f41fe75e2dd8dd38f7bea7b9501edd4f9b72fa5.zip
dpdk-6f41fe75e2dd8dd38f7bea7b9501edd4f9b72fa5.tar.gz
dpdk-6f41fe75e2dd8dd38f7bea7b9501edd4f9b72fa5.tar.xz
eal: deprecate rte_snprintf
The function rte_snprintf serves no useful purpose. It is the same as snprintf() for all valid inputs. Deprecate it and replace all uses in current code. Leave the tests for the deprecated function in place. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Diffstat (limited to 'lib/librte_acl')
-rw-r--r--lib/librte_acl/rte_acl.c4
-rw-r--r--lib/librte_acl/rte_acl_osdep_alone.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/librte_acl/rte_acl.c b/lib/librte_acl/rte_acl.c
index 129a41f..ea3ce3a 100644
--- a/lib/librte_acl/rte_acl.c
+++ b/lib/librte_acl/rte_acl.c
@@ -96,7 +96,7 @@ rte_acl_create(const struct rte_acl_param *param)
return NULL;
}
- rte_snprintf(name, sizeof(name), "ACL_%s", param->name);
+ snprintf(name, sizeof(name), "ACL_%s", param->name);
/* calculate amount of memory required for pattern set. */
sz = sizeof(*ctx) + param->max_rule_num * param->rule_size;
@@ -119,7 +119,7 @@ rte_acl_create(const struct rte_acl_param *param)
ctx->max_rules = param->max_rule_num;
ctx->rule_sz = param->rule_size;
ctx->socket_id = param->socket_id;
- rte_snprintf(ctx->name, sizeof(ctx->name), "%s", param->name);
+ snprintf(ctx->name, sizeof(ctx->name), "%s", param->name);
TAILQ_INSERT_TAIL(acl_list, ctx, next);
diff --git a/lib/librte_acl/rte_acl_osdep_alone.h b/lib/librte_acl/rte_acl_osdep_alone.h
index a46d71e..a7b7424 100644
--- a/lib/librte_acl/rte_acl_osdep_alone.h
+++ b/lib/librte_acl/rte_acl_osdep_alone.h
@@ -229,7 +229,7 @@ rte_dummy_tailq(void)
/*
* rte_string related
*/
-#define rte_snprintf(str, len, frmt, args...) snprintf(str, len, frmt, ##args)
+#define snprintf(str, len, frmt, args...) snprintf(str, len, frmt, ##args)
/*
* rte_log related