summaryrefslogtreecommitdiff
path: root/examples/netmap_compat
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 /examples/netmap_compat
parente8ed6c78177fbbafa326d9efc590a51705848200 (diff)
downloaddpdk-draft-windows-6f41fe75e2dd8dd38f7bea7b9501edd4f9b72fa5.zip
dpdk-draft-windows-6f41fe75e2dd8dd38f7bea7b9501edd4f9b72fa5.tar.gz
dpdk-draft-windows-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 'examples/netmap_compat')
-rw-r--r--examples/netmap_compat/bridge/bridge.c4
-rw-r--r--examples/netmap_compat/lib/compat_netmap.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/examples/netmap_compat/bridge/bridge.c b/examples/netmap_compat/bridge/bridge.c
index d9c892c..898277e 100644
--- a/examples/netmap_compat/bridge/bridge.c
+++ b/examples/netmap_compat/bridge/bridge.c
@@ -234,7 +234,7 @@ netmap_port_open(uint32_t idx)
port->fd = rte_netmap_open("/dev/netmap", O_RDWR);
- rte_snprintf(req.nr_name, sizeof(req.nr_name), "%s", port->str);
+ snprintf(req.nr_name, sizeof(req.nr_name), "%s", port->str);
req.nr_version = NETMAP_API;
req.nr_ringid = 0;
@@ -244,7 +244,7 @@ netmap_port_open(uint32_t idx)
return (err);
}
- rte_snprintf(req.nr_name, sizeof(req.nr_name), "%s", port->str);
+ snprintf(req.nr_name, sizeof(req.nr_name), "%s", port->str);
req.nr_version = NETMAP_API;
req.nr_ringid = 0;
diff --git a/examples/netmap_compat/lib/compat_netmap.c b/examples/netmap_compat/lib/compat_netmap.c
index 190151e..44b3f8e 100644
--- a/examples/netmap_compat/lib/compat_netmap.c
+++ b/examples/netmap_compat/lib/compat_netmap.c
@@ -324,7 +324,7 @@ netmap_regif(struct nmreq *req, uint32_t idx, uint8_t port)
if (req->nr_ringid != 0)
return (-EINVAL);
- rte_snprintf(nmif->ni_name, sizeof(nmif->ni_name), "%s", req->nr_name);
+ snprintf(nmif->ni_name, sizeof(nmif->ni_name), "%s", req->nr_name);
nmif->ni_version = req->nr_version;
/* Netmap uses ni_(r|t)x_rings + 1 */