]> git.droids-corp.org - dpdk.git/blobdiff - lib/librte_vhost/socket.c
use sizeof to avoid double use of a length define
[dpdk.git] / lib / librte_vhost / socket.c
index 636fc25c63b1b7e0ff038b68202dfc6001f827a3..6eec427e466401529f4be17b7c4fe40cd6d3907d 100644 (file)
@@ -485,7 +485,7 @@ vhost_user_reconnect_init(void)
                                "failed to destroy reconnect mutex");
                }
        } else {
-               snprintf(thread_name, RTE_MAX_THREAD_NAME_LEN,
+               snprintf(thread_name, sizeof(thread_name),
                         "vhost-reconn");
 
                if (rte_thread_setname(reconn_tid, thread_name)) {
@@ -1029,7 +1029,7 @@ rte_vhost_driver_start(const char *path)
                        fdset_pipe_uninit(&vhost_user.fdset);
                        return -1;
                } else {
-                       snprintf(thread_name, RTE_MAX_THREAD_NAME_LEN,
+                       snprintf(thread_name, sizeof(thread_name),
                                 "vhost-events");
 
                        if (rte_thread_setname(fdset_tid, thread_name)) {