summaryrefslogtreecommitdiff
path: root/examples/multi_process/client_server_mp
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/multi_process/client_server_mp
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 'examples/multi_process/client_server_mp')
-rw-r--r--examples/multi_process/client_server_mp/mp_server/main.c2
-rw-r--r--examples/multi_process/client_server_mp/shared/common.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/examples/multi_process/client_server_mp/mp_server/main.c b/examples/multi_process/client_server_mp/mp_server/main.c
index 1eaf761..b3887b1 100644
--- a/examples/multi_process/client_server_mp/mp_server/main.c
+++ b/examples/multi_process/client_server_mp/mp_server/main.c
@@ -103,7 +103,7 @@ get_printable_mac_addr(uint8_t port)
if (unlikely(addresses[port][0]=='\0')){
struct ether_addr mac;
rte_eth_macaddr_get(port, &mac);
- rte_snprintf(addresses[port], sizeof(addresses[port]),
+ snprintf(addresses[port], sizeof(addresses[port]),
"%02x:%02x:%02x:%02x:%02x:%02x\n",
mac.addr_bytes[0], mac.addr_bytes[1], mac.addr_bytes[2],
mac.addr_bytes[3], mac.addr_bytes[4], mac.addr_bytes[5]);
diff --git a/examples/multi_process/client_server_mp/shared/common.h b/examples/multi_process/client_server_mp/shared/common.h
index 16efd2e..631c463 100644
--- a/examples/multi_process/client_server_mp/shared/common.h
+++ b/examples/multi_process/client_server_mp/shared/common.h
@@ -78,7 +78,7 @@ get_rx_queue_name(unsigned id)
* by maximum 3 digits (plus an extra byte for safety) */
static char buffer[sizeof(MP_CLIENT_RXQ_NAME) + 2];
- rte_snprintf(buffer, sizeof(buffer) - 1, MP_CLIENT_RXQ_NAME, id);
+ snprintf(buffer, sizeof(buffer) - 1, MP_CLIENT_RXQ_NAME, id);
return buffer;
}