]> git.droids-corp.org - dpdk.git/blobdiff - examples/vhost/main.c
use sizeof to avoid double use of a length define
[dpdk.git] / examples / vhost / main.c
index 84e0d6366d9333d3ad4c7d2b737c3e56e73b238b..e33a0f3c97f54aa14dd2520002754e1fdd2c28a8 100644 (file)
@@ -1499,7 +1499,7 @@ main(int argc, char *argv[])
                                "Cannot create print-stats thread\n");
 
                /* Set thread_name for aid in debugging.  */
-               snprintf(thread_name, RTE_MAX_THREAD_NAME_LEN, "print-stats");
+               snprintf(thread_name, sizeof(thread_name), "print-stats");
                ret = rte_thread_setname(tid, thread_name);
                if (ret != 0)
                        RTE_LOG(DEBUG, VHOST_CONFIG,