]> git.droids-corp.org - dpdk.git/blobdiff - lib/librte_lpm/rte_lpm6.c
replace snprintf with strlcpy without adding extra include
[dpdk.git] / lib / librte_lpm / rte_lpm6.c
index 6212003f4ce66cdb7350d93e0e41d1d43c2d2473..a91803113649a3dcb5e7bef595dbc0d89186e47e 100644 (file)
@@ -352,7 +352,7 @@ rte_lpm6_create(const char *name, int socket_id,
        /* Save user arguments. */
        lpm->max_rules = config->max_rules;
        lpm->number_tbl8s = config->number_tbl8s;
-       snprintf(lpm->name, sizeof(lpm->name), "%s", name);
+       strlcpy(lpm->name, name, sizeof(lpm->name));
        lpm->rules_tbl = rules_tbl;
        lpm->tbl8_pool = tbl8_pool;
        lpm->tbl8_hdrs = tbl8_hdrs;