]> git.droids-corp.org - dpdk.git/blobdiff - lib/librte_hash/rte_cuckoo_hash.c
replace snprintf with strlcpy without adding extra include
[dpdk.git] / lib / librte_hash / rte_cuckoo_hash.c
index 4fcf5485eea0e0605b39812651bdc71a13cb1add..261267b7fd3df5afdab8e2596a9b9cf2d1771941 100644 (file)
@@ -381,7 +381,7 @@ rte_hash_create(const struct rte_hash_parameters *params)
                default_hash_func = (rte_hash_function)rte_hash_crc;
 #endif
        /* Setup hash context */
-       snprintf(h->name, sizeof(h->name), "%s", params->name);
+       strlcpy(h->name, params->name, sizeof(h->name));
        h->entries = params->entries;
        h->key_len = params->key_len;
        h->key_entry_size = key_entry_size;