From: "Steven Rostedt (VMware)" <rostedt@xxxxxxxxxxx> There's no reason to assign tsync to NULL nor add a typecast to data, as void pointers naturally can be converted to any type. Signed-off-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx> --- lib/trace-cmd/trace-timesync.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/trace-cmd/trace-timesync.c b/lib/trace-cmd/trace-timesync.c index ad73f08f7070..4ed283eb1fb8 100644 --- a/lib/trace-cmd/trace-timesync.c +++ b/lib/trace-cmd/trace-timesync.c @@ -697,9 +697,8 @@ static int tsync_with_guest(struct tracecmd_time_sync *tsync) static void *tsync_host_thread(void *data) { - struct tracecmd_time_sync *tsync = NULL; + struct tracecmd_time_sync *tsync = data; - tsync = (struct tracecmd_time_sync *)data; tsync_with_guest(tsync); tracecmd_msg_handle_close(tsync->msg_handle); tsync->msg_handle = NULL; @@ -865,11 +864,9 @@ int tracecmd_tsync_with_guest_stop(struct tracecmd_time_sync *tsync) static void *tsync_agent_thread(void *data) { - struct tracecmd_time_sync *tsync = NULL; + struct tracecmd_time_sync *tsync = data; int sd; - tsync = (struct tracecmd_time_sync *)data; - while (true) { sd = accept(tsync->msg_handle->fd, NULL, NULL); if (sd < 0) { -- 2.30.1