Commit 91011328 authored by Pavel Emelyanov's avatar Pavel Emelyanov

criu: Several formatting fixes

Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent d9ec409b
...@@ -115,8 +115,8 @@ int dedup_one_iovec(struct page_read *pr, struct iovec *iov) ...@@ -115,8 +115,8 @@ int dedup_one_iovec(struct page_read *pr, struct iovec *iov)
unsigned long piov_end; unsigned long piov_end;
ret = seek_pagemap_page(pr, off, false); ret = seek_pagemap_page(pr, off, false);
if (ret == -1) { if (ret == -1) {
if(off < pr->cvaddr) { if (off < pr->cvaddr) {
if(pr->cvaddr < iov_end) if (pr->cvaddr < iov_end)
off = pr->cvaddr; off = pr->cvaddr;
else else
return 0; return 0;
......
...@@ -1417,7 +1417,7 @@ static int dump_one_task(struct pstree_item *item) ...@@ -1417,7 +1417,7 @@ static int dump_one_task(struct pstree_item *item)
} }
ret = parse_posix_timers(pid, &proc_args); ret = parse_posix_timers(pid, &proc_args);
if (ret < 0){ if (ret < 0) {
pr_err("Can't read posix timers file (pid: %d)\n", pid); pr_err("Can't read posix timers file (pid: %d)\n", pid);
goto err; goto err;
} }
......
...@@ -49,7 +49,7 @@ static int execute_syscall(struct parasite_ctl *ctl, ...@@ -49,7 +49,7 @@ static int execute_syscall(struct parasite_ctl *ctl,
* @<size> -- ret-arg of size <size> * @<size> -- ret-arg of size <size>
*/ */
if ((opt[i][0] == '&') || (opt[i][0] == '@')){ if ((opt[i][0] == '&') || (opt[i][0] == '@')) {
int len; int len;
if (!r_mem) { if (!r_mem) {
......
...@@ -478,7 +478,7 @@ static int cr_show_pid(int pid) ...@@ -478,7 +478,7 @@ static int cr_show_pid(int pid)
PstreeEntry *pe; PstreeEntry *pe;
ret = pb_read_one_eof(fd, &pe, PB_PSTREE); ret = pb_read_one_eof(fd, &pe, PB_PSTREE);
if (ret <= 0){ if (ret <= 0) {
close(fd); close(fd);
return ret; return ret;
} }
......
...@@ -71,7 +71,7 @@ int write_img_inventory(void) ...@@ -71,7 +71,7 @@ int write_img_inventory(void)
crt.state = TASK_ALIVE; crt.state = TASK_ALIVE;
crt.pid.real = getpid(); crt.pid.real = getpid();
if (get_task_ids(&crt)){ if (get_task_ids(&crt)) {
close(fd); close(fd);
return -1; return -1;
} }
......
...@@ -366,7 +366,7 @@ static inline void hlist_add_after(struct hlist_node *n, ...@@ -366,7 +366,7 @@ static inline void hlist_add_after(struct hlist_node *n,
n->next = next; n->next = next;
next->pprev = &n->next; next->pprev = &n->next;
if(next->next) if (next->next)
next->next->pprev = &next->next; next->next->pprev = &next->next;
} }
......
...@@ -1507,7 +1507,7 @@ int mntns_collect_root(pid_t pid) ...@@ -1507,7 +1507,7 @@ int mntns_collect_root(pid_t pid)
pfd = open_pid_proc(pid); pfd = open_pid_proc(pid);
ret = readlinkat(pfd, "root", path, sizeof(path) - 1); ret = readlinkat(pfd, "root", path, sizeof(path) - 1);
if (ret < 0){ if (ret < 0) {
close_pid_proc(); close_pid_proc();
return ret; return ret;
} }
......
...@@ -560,6 +560,7 @@ static int open_page_local_xfer(struct page_xfer *xfer, int fd_type, long id) ...@@ -560,6 +560,7 @@ static int open_page_local_xfer(struct page_xfer *xfer, int fd_type, long id)
if (opts.auto_dedup && !opts.use_page_server) { if (opts.auto_dedup && !opts.use_page_server) {
int ret; int ret;
int pfd; int pfd;
pfd = openat(get_service_fd(IMG_FD_OFF), CR_PARENT_LINK, O_RDONLY); pfd = openat(get_service_fd(IMG_FD_OFF), CR_PARENT_LINK, O_RDONLY);
if (pfd < 0 && errno == ENOENT) if (pfd < 0 && errno == ENOENT)
goto out; goto out;
......
...@@ -121,7 +121,7 @@ static int dump_posix_timers(struct parasite_dump_posix_timers_args *args) ...@@ -121,7 +121,7 @@ static int dump_posix_timers(struct parasite_dump_posix_timers_args *args)
int i; int i;
int ret = 0; int ret = 0;
for(i = 0; i < args->timer_n; i++){ for(i = 0; i < args->timer_n; i++) {
ret = sys_timer_gettime(args->timer[i].it_id, &args->timer[i].val); ret = sys_timer_gettime(args->timer[i].it_id, &args->timer[i].val);
if (ret < 0) { if (ret < 0) {
pr_err("sys_timer_gettime failed (%d)\n", ret); pr_err("sys_timer_gettime failed (%d)\n", ret);
......
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