commands: assign before converting to pointer

parent f8db64b8
......@@ -402,8 +402,10 @@ pid_t lxc_cmd_get_init_pid(const char *name, const char *lxcpath)
static int lxc_cmd_get_init_pid_callback(int fd, struct lxc_cmd_req *req,
struct lxc_handler *handler)
{
intmax_t pid = handler->pid;
struct lxc_cmd_rsp rsp = {
.data = INTMAX_TO_PTR(handler->pid)
.data = INTMAX_TO_PTR(pid)
};
return lxc_cmd_rsp_send(fd, &rsp);
......
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