Commit 5ef03486 authored by Andrei Vagin's avatar Andrei Vagin Committed by Andrei Vagin

restore: check whether a thread core contains comm or not

  CC       criu/cr-restore.o
criu/cr-restore.c:3470:22: error: address of array 'thread_args[i].comm' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
                if (thread_args[i].comm)
                ~~  ~~~~~~~~~~~~~~~^~~~
1 error generated.
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent 75d049c5
...@@ -3461,7 +3461,7 @@ static int sigreturn_restore(pid_t pid, struct task_restore_args *task_args, uns ...@@ -3461,7 +3461,7 @@ static int sigreturn_restore(pid_t pid, struct task_restore_args *task_args, uns
if (construct_sigframe(sigframe, sigframe, blkset, tcore)) if (construct_sigframe(sigframe, sigframe, blkset, tcore))
goto err; goto err;
if (thread_args[i].comm) if (tcore->thread_core->comm)
strncpy(thread_args[i].comm, tcore->thread_core->comm, TASK_COMM_LEN); strncpy(thread_args[i].comm, tcore->thread_core->comm, TASK_COMM_LEN);
else else
strncpy(thread_args[i].comm, core->tc->comm, TASK_COMM_LEN); strncpy(thread_args[i].comm, core->tc->comm, TASK_COMM_LEN);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment