Fix: test uses sizeof() on the wrong operand of strncpy
[lttng-tools.git] / tests / unit / test_session.c
index 03e6b91611ad0732fa82faf0c386c252cf0ca4c5..cfbb52d048dd00820e6817a24dbe221a5a165716 100644 (file)
@@ -157,7 +157,7 @@ static int destroy_one_session(struct ltt_session *session)
        int ret;
        char session_name[NAME_MAX];
 
-       strncpy(session_name, session->name, sizeof(session->name));
+       strncpy(session_name, session->name, sizeof(session_name));
        session_name[sizeof(session_name) - 1] = '\0';
 
        ret = session_destroy(session);
This page took 0.024088 seconds and 4 git commands to generate.