criu: initialize status

parent 57d668df
......@@ -829,9 +829,10 @@ out_unlock:
*/
static void do_restore(struct lxc_container *c, int status_pipe, struct migrate_opts *opts, char *criu_version)
{
int fd;
pid_t pid;
struct lxc_handler *handler;
int status, fd;
int status = 0;
int pipes[2] = {-1, -1};
/* Try to detach from the current controlling tty if it exists.
......@@ -1051,9 +1052,9 @@ out:
*/
if (!status)
status = 1;
if (write(status_pipe, &status, sizeof(status)) != sizeof(status)) {
if (write(status_pipe, &status, sizeof(status)) != sizeof(status))
SYSERROR("writing status failed");
}
close(status_pipe);
}
......
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