diff --git a/criu/libnetlink.c b/criu/libnetlink.c index 18a323b8d..f9da58e9a 100644 --- a/criu/libnetlink.c +++ b/criu/libnetlink.c @@ -20,9 +20,9 @@ static int nlmsg_receive(char *buf, int len, if (hdr->nlmsg_seq != CR_NLMSG_SEQ) continue; if (hdr->nlmsg_type == NLMSG_DONE) { - int *len = (int *)NLMSG_DATA(hdr); - if (*len < 0) - return err_cb(*len, ns, arg); + int *length = (int *)NLMSG_DATA(hdr); + if (*length < 0) + return err_cb(*length, ns, arg); return 0; } if (hdr->nlmsg_type == NLMSG_ERROR) { diff --git a/criu/path.c b/criu/path.c index 22a89a4aa..637d0fae2 100644 --- a/criu/path.c +++ b/criu/path.c @@ -88,11 +88,11 @@ char *mnt_get_sibling_path(struct mount_info *m, len -= off; path += off; } else { - int len = strlen(cut_root); - if (strncmp(rpath, cut_root, len)) + int length = strlen(cut_root); + if (strncmp(rpath, cut_root, length)) return NULL; rpath += strlen(cut_root); - if (len > 0 && (rpath[0] && rpath[0] != '/')) + if (length > 0 && (rpath[0] && rpath[0] != '/')) return NULL; } if (rpath[0] == '/') diff --git a/criu/pstree.c b/criu/pstree.c index a876615fb..f1513dc81 100644 --- a/criu/pstree.c +++ b/criu/pstree.c @@ -674,12 +674,12 @@ static int prepare_pstree_ids(pid_t pid) leader = pstree_item_by_virt(item->sid); BUG_ON(leader == NULL); if (leader->pid->state != TASK_UNDEF) { - pid_t pid; + pid_t helper_pid; - pid = get_free_pid(); - if (pid < 0) + helper_pid = get_free_pid(); + if (helper_pid < 0) break; - helper = lookup_create_item(pid); + helper = lookup_create_item(helper_pid); if (helper == NULL) return -1; @@ -771,15 +771,15 @@ static int prepare_pstree_ids(pid_t pid) /* Add a process group leader if it is absent */ for_each_pstree_item(item) { - struct pid *pid; + struct pid *pgid; if (!item->pgid || vpid(item) == item->pgid) continue; - pid = pstree_pid_by_virt(item->pgid); - if (pid->state != TASK_UNDEF) { - BUG_ON(pid->state == TASK_THREAD); - rsti(item)->pgrp_leader = pid->item; + pgid = pstree_pid_by_virt(item->pgid); + if (pgid->state != TASK_UNDEF) { + BUG_ON(pgid->state == TASK_THREAD); + rsti(item)->pgrp_leader = pgid->item; continue; } @@ -791,7 +791,7 @@ static int prepare_pstree_ids(pid_t pid) if (current_pgid == item->pgid) continue; - helper = pid->item; + helper = pgid->item; helper->sid = item->sid; helper->pgid = item->pgid;