Commit 066ec066 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

crtools: remove unused variables (v3)

Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 7454ab1c
...@@ -866,8 +866,6 @@ err: ...@@ -866,8 +866,6 @@ err:
static int dump_task_core(struct core_entry *core, int fd_core) static int dump_task_core(struct core_entry *core, int fd_core)
{ {
int ret;
pr_info("Dumping header ... "); pr_info("Dumping header ... ");
core->header.version = HEADER_VERSION; core->header.version = HEADER_VERSION;
...@@ -1378,7 +1376,6 @@ static int dump_pstree(pid_t pid, const struct list_head *pstree_list) ...@@ -1378,7 +1376,6 @@ static int dump_pstree(pid_t pid, const struct list_head *pstree_list)
{ {
const struct pstree_item *item; const struct pstree_item *item;
struct pstree_entry e; struct pstree_entry e;
unsigned long i;
int ret = -1; int ret = -1;
int pstree_fd; int pstree_fd;
...@@ -1653,7 +1650,7 @@ int cr_dump_tasks(pid_t pid, const struct cr_options *opts) ...@@ -1653,7 +1650,7 @@ int cr_dump_tasks(pid_t pid, const struct cr_options *opts)
{ {
LIST_HEAD(pstree_list); LIST_HEAD(pstree_list);
struct pstree_item *item; struct pstree_item *item;
int i, ret = -1; int ret = -1;
pr_info("========================================\n"); pr_info("========================================\n");
pr_info("Dumping process %s(pid: %d)\n", !opts->leader_only ? "group " : "", pid); pr_info("Dumping process %s(pid: %d)\n", !opts->leader_only ? "group " : "", pid);
......
...@@ -268,7 +268,7 @@ static int prepare_sigactions(int pid) ...@@ -268,7 +268,7 @@ static int prepare_sigactions(int pid)
rt_sigaction_t act, oact; rt_sigaction_t act, oact;
int fd_sigact; int fd_sigact;
struct sa_entry e; struct sa_entry e;
int sig, i; int sig;
int ret = -1; int ret = -1;
fd_sigact = open_image_ro(CR_FD_SIGACT, pid); fd_sigact = open_image_ro(CR_FD_SIGACT, pid);
...@@ -521,8 +521,6 @@ err: ...@@ -521,8 +521,6 @@ err:
static void sigchld_handler(int signal, siginfo_t *siginfo, void *data) static void sigchld_handler(int signal, siginfo_t *siginfo, void *data)
{ {
int status, pid;
if (siginfo->si_code & CLD_EXITED) if (siginfo->si_code & CLD_EXITED)
pr_err("%d exited, status=%d\n", pr_err("%d exited, status=%d\n",
siginfo->si_pid, siginfo->si_status); siginfo->si_pid, siginfo->si_status);
...@@ -656,7 +654,7 @@ static int restore_task_with_children(void *_arg) ...@@ -656,7 +654,7 @@ static int restore_task_with_children(void *_arg)
static int restore_root_task(pid_t pid, struct cr_options *opts) static int restore_root_task(pid_t pid, struct cr_options *opts)
{ {
int ret, i; int ret;
struct sigaction act, old_act; struct sigaction act, old_act;
struct pstree_item *init; struct pstree_item *init;
...@@ -957,8 +955,6 @@ static int sigreturn_restore(pid_t pid, struct list_head *tgt_vmas, int nr_vmas) ...@@ -957,8 +955,6 @@ static int sigreturn_restore(pid_t pid, struct list_head *tgt_vmas, int nr_vmas)
int fd_pages = -1; int fd_pages = -1;
int i; int i;
int *fd_core_threads;
pr_info("Restore via sigreturn\n"); pr_info("Restore via sigreturn\n");
restore_code_len = 0; restore_code_len = 0;
......
...@@ -182,9 +182,6 @@ void show_pipes_data(int fd_pipes, struct cr_options *o) ...@@ -182,9 +182,6 @@ void show_pipes_data(int fd_pipes, struct cr_options *o)
pr_img_head(CR_FD_PIPES_DATA); pr_img_head(CR_FD_PIPES_DATA);
while (1) { while (1) {
int ret;
off_t off;
ret = read_img_eof(fd_pipes, &e); ret = read_img_eof(fd_pipes, &e);
if (ret <= 0) if (ret <= 0)
goto out; goto out;
...@@ -206,8 +203,6 @@ void show_pipes(int fd_pipes, struct cr_options *o) ...@@ -206,8 +203,6 @@ void show_pipes(int fd_pipes, struct cr_options *o)
pr_img_head(CR_FD_PIPES); pr_img_head(CR_FD_PIPES);
while (1) { while (1) {
int ret;
ret = read_img_eof(fd_pipes, &e); ret = read_img_eof(fd_pipes, &e);
if (ret <= 0) if (ret <= 0)
goto out; goto out;
...@@ -311,7 +306,7 @@ void show_pages(int fd_pages, struct cr_options *o) ...@@ -311,7 +306,7 @@ void show_pages(int fd_pages, struct cr_options *o)
} else { } else {
while (1) { while (1) {
struct page_entry e; struct page_entry e;
int i, j; int i;
pr_msg("\t"); pr_msg("\t");
for (i = 0; i < DEF_PAGES_PER_LINE; i++) { for (i = 0; i < DEF_PAGES_PER_LINE; i++) {
...@@ -483,8 +478,6 @@ void show_pstree(int fd_pstree, struct cr_options *o) ...@@ -483,8 +478,6 @@ void show_pstree(int fd_pstree, struct cr_options *o)
static void show_core_regs(int fd_core) static void show_core_regs(int fd_core)
{ {
struct user_regs_entry regs; struct user_regs_entry regs;
struct desc_struct tls;
int i;
pr_msg("\n\t---[GP registers set]---\n"); pr_msg("\n\t---[GP registers set]---\n");
...@@ -521,7 +514,6 @@ static inline char *task_state_str(int state) ...@@ -521,7 +514,6 @@ static inline char *task_state_str(int state)
static void show_core_rest(int fd_core) static void show_core_rest(int fd_core)
{ {
struct task_core_entry tc; struct task_core_entry tc;
int i;
lseek(fd_core, GET_FILE_OFF(struct core_entry, tc), SEEK_SET); lseek(fd_core, GET_FILE_OFF(struct core_entry, tc), SEEK_SET);
if (read_img(fd_core, &tc) < 0) if (read_img(fd_core, &tc) < 0)
......
...@@ -114,7 +114,6 @@ int dump_eventfd(struct fd_parms *p, int lfd, const struct cr_fdset *set) ...@@ -114,7 +114,6 @@ int dump_eventfd(struct fd_parms *p, int lfd, const struct cr_fdset *set)
static int eventfd_open(struct file_desc *d) static int eventfd_open(struct file_desc *d)
{ {
struct eventfd_file_info *info; struct eventfd_file_info *info;
size_t size;
int tmp; int tmp;
info = container_of(d, struct eventfd_file_info, d); info = container_of(d, struct eventfd_file_info, d);
......
...@@ -337,7 +337,6 @@ int collect_reg_files(void) ...@@ -337,7 +337,6 @@ int collect_reg_files(void)
static int collect_fd(int pid, struct fdinfo_entry *e, struct rst_info *rst_info) static int collect_fd(int pid, struct fdinfo_entry *e, struct rst_info *rst_info)
{ {
int i;
struct fdinfo_list_entry *l, *le = &fdinfo_list[nr_fdinfo_list]; struct fdinfo_list_entry *l, *le = &fdinfo_list[nr_fdinfo_list];
struct file_desc *fdesc; struct file_desc *fdesc;
...@@ -376,7 +375,6 @@ static int collect_fd(int pid, struct fdinfo_entry *e, struct rst_info *rst_info ...@@ -376,7 +375,6 @@ static int collect_fd(int pid, struct fdinfo_entry *e, struct rst_info *rst_info
int prepare_fd_pid(int pid, struct rst_info *rst_info) int prepare_fd_pid(int pid, struct rst_info *rst_info)
{ {
int fdinfo_fd, ret = 0; int fdinfo_fd, ret = 0;
u32 type = 0;
INIT_LIST_HEAD(&rst_info->fds); INIT_LIST_HEAD(&rst_info->fds);
INIT_LIST_HEAD(&rst_info->eventpoll); INIT_LIST_HEAD(&rst_info->eventpoll);
...@@ -551,7 +549,7 @@ int send_fd_to_peer(int fd, struct fdinfo_list_entry *fle, int tsk) ...@@ -551,7 +549,7 @@ int send_fd_to_peer(int fd, struct fdinfo_list_entry *fle, int tsk)
static int open_fd(int pid, struct fdinfo_entry *fe, struct file_desc *d) static int open_fd(int pid, struct fdinfo_entry *fe, struct file_desc *d)
{ {
int tmp; int tmp;
int serv, sock; int sock;
struct fdinfo_list_entry *fle; struct fdinfo_list_entry *fle;
fle = file_master(d); fle = file_master(d);
...@@ -602,7 +600,6 @@ static int open_fd(int pid, struct fdinfo_entry *fe, struct file_desc *d) ...@@ -602,7 +600,6 @@ static int open_fd(int pid, struct fdinfo_entry *fe, struct file_desc *d)
} }
close(sock); close(sock);
out:
return 0; return 0;
} }
...@@ -634,7 +631,6 @@ static int receive_fd(int pid, struct fdinfo_entry *fe, struct file_desc *d) ...@@ -634,7 +631,6 @@ static int receive_fd(int pid, struct fdinfo_entry *fe, struct file_desc *d)
static int open_fdinfo(int pid, struct fdinfo_entry *fe, int state) static int open_fdinfo(int pid, struct fdinfo_entry *fe, int state)
{ {
u32 mag;
int ret = 0; int ret = 0;
struct file_desc *fdesc; struct file_desc *fdesc;
...@@ -658,10 +654,9 @@ static int open_fdinfo(int pid, struct fdinfo_entry *fe, int state) ...@@ -658,10 +654,9 @@ static int open_fdinfo(int pid, struct fdinfo_entry *fe, int state)
int prepare_fds(struct pstree_item *me) int prepare_fds(struct pstree_item *me)
{ {
u32 type = 0, ret; u32 ret;
int state; int state;
struct fdinfo_list_entry *fle; struct fdinfo_list_entry *fle;
int nr = 0;
pr_info("Opening fdinfo-s\n"); pr_info("Opening fdinfo-s\n");
......
...@@ -226,7 +226,7 @@ static int restore_one_inotify(int inotify_fd, struct inotify_wd_entry *iwe) ...@@ -226,7 +226,7 @@ static int restore_one_inotify(int inotify_fd, struct inotify_wd_entry *iwe)
{ {
char path[32]; char path[32];
int mntfd, ret = -1; int mntfd, ret = -1;
int i, wd, target; int wd, target;
mntfd = open_mount(iwe->s_dev); mntfd = open_mount(iwe->s_dev);
if (mntfd < 0) { if (mntfd < 0) {
...@@ -277,7 +277,6 @@ static int open_inotify_fd(struct file_desc *d) ...@@ -277,7 +277,6 @@ static int open_inotify_fd(struct file_desc *d)
{ {
struct inotify_file_info *info; struct inotify_file_info *info;
struct inotify_wd_info *wd_info; struct inotify_wd_info *wd_info;
struct file_desc *p;
int tmp; int tmp;
info = container_of(d, struct inotify_file_info, d); info = container_of(d, struct inotify_file_info, d);
...@@ -356,8 +355,6 @@ int collect_inotify(void) ...@@ -356,8 +355,6 @@ int collect_inotify(void)
goto err; goto err;
while (1) { while (1) {
int idx;
mark = xmalloc(sizeof(*mark)); mark = xmalloc(sizeof(*mark));
if (!mark) if (!mark)
goto err; goto err;
......
...@@ -141,7 +141,7 @@ static int dump_ipc_sem(int fd) ...@@ -141,7 +141,7 @@ static int dump_ipc_sem(int fd)
{ {
int i, maxid; int i, maxid;
struct seminfo info; struct seminfo info;
int err, slot; int slot;
maxid = semctl(0, 0, SEM_INFO, &info); maxid = semctl(0, 0, SEM_INFO, &info);
if (maxid < 0) { if (maxid < 0) {
...@@ -264,7 +264,7 @@ static int dump_ipc_msg(int fd) ...@@ -264,7 +264,7 @@ static int dump_ipc_msg(int fd)
{ {
int i, maxid; int i, maxid;
struct msginfo info; struct msginfo info;
int err, slot; int slot;
maxid = msgctl(0, MSG_INFO, (struct msqid_ds *)&info); maxid = msgctl(0, MSG_INFO, (struct msqid_ds *)&info);
if (maxid < 0) { if (maxid < 0) {
...@@ -445,7 +445,7 @@ static int dump_ipc_data(const struct cr_fdset *fdset) ...@@ -445,7 +445,7 @@ static int dump_ipc_data(const struct cr_fdset *fdset)
int dump_ipc_ns(int ns_pid, const struct cr_fdset *fdset) int dump_ipc_ns(int ns_pid, const struct cr_fdset *fdset)
{ {
int fd, ret; int ret;
ret = switch_ns(ns_pid, CLONE_NEWIPC, "ipc"); ret = switch_ns(ns_pid, CLONE_NEWIPC, "ipc");
if (ret < 0) if (ret < 0)
...@@ -648,9 +648,8 @@ static int prepare_ipc_sem(int pid) ...@@ -648,9 +648,8 @@ static int prepare_ipc_sem(int pid)
return -1; return -1;
while (1) { while (1) {
int ret, id; int ret;
struct ipc_sem_entry entry; struct ipc_sem_entry entry;
struct semid_ds ds;
ret = read_img_eof(fd, &entry); ret = read_img_eof(fd, &entry);
if (ret < 0) if (ret < 0)
...@@ -759,9 +758,8 @@ static int prepare_ipc_msg(int pid) ...@@ -759,9 +758,8 @@ static int prepare_ipc_msg(int pid)
return -1; return -1;
while (1) { while (1) {
int ret, id; int ret;
struct ipc_msg_entry entry; struct ipc_msg_entry entry;
struct msqid_ds ds;
ret = read_img_eof(fd, &entry); ret = read_img_eof(fd, &entry);
if (ret < 0) { if (ret < 0) {
...@@ -852,7 +850,7 @@ static int prepare_ipc_shm(int pid) ...@@ -852,7 +850,7 @@ static int prepare_ipc_shm(int pid)
return -1; return -1;
while (1) { while (1) {
int ret, id; int ret;
struct ipc_shm_entry shm; struct ipc_shm_entry shm;
ret = read_img_eof(fd, &shm); ret = read_img_eof(fd, &shm);
......
...@@ -604,7 +604,6 @@ out: ...@@ -604,7 +604,6 @@ out:
int parasite_cure_seized(struct parasite_ctl *ctl) int parasite_cure_seized(struct parasite_ctl *ctl)
{ {
parasite_status_t args = { };
int ret = 0; int ret = 0;
if (ctl->parasite_ip) { if (ctl->parasite_ip) {
......
...@@ -32,8 +32,6 @@ ...@@ -32,8 +32,6 @@
static void *brk_start, *brk_end, *brk_tail; static void *brk_start, *brk_end, *brk_tail;
static struct page_entry page;
static struct vma_entry vma;
static int logfd = -1; static int logfd = -1;
static int tsock = -1; static int tsock = -1;
...@@ -77,6 +75,7 @@ static void brk_free(unsigned long bytes) ...@@ -77,6 +75,7 @@ static void brk_free(unsigned long bytes)
brk_tail -= bytes; brk_tail -= bytes;
} }
#if 0
static const unsigned char hex[] = "0123456789abcdef"; static const unsigned char hex[] = "0123456789abcdef";
static char *long2hex(unsigned long v) static char *long2hex(unsigned long v)
{ {
...@@ -92,6 +91,7 @@ static char *long2hex(unsigned long v) ...@@ -92,6 +91,7 @@ static char *long2hex(unsigned long v)
return buf; return buf;
} }
#endif
static void sys_write_msg(const char *msg) static void sys_write_msg(const char *msg)
{ {
...@@ -331,9 +331,7 @@ static int dump_itimer(int which, int fd, parasite_status_t *st) ...@@ -331,9 +331,7 @@ static int dump_itimer(int which, int fd, parasite_status_t *st)
static int dump_itimers(parasite_status_t *st) static int dump_itimers(parasite_status_t *st)
{ {
rt_sigaction_t act; int fd;
struct sa_entry e;
int fd, sig;
int ret = -1; int ret = -1;
fd = recv_fd(tsock); fd = recv_fd(tsock);
...@@ -364,8 +362,6 @@ static int reset_blocked = 0; ...@@ -364,8 +362,6 @@ static int reset_blocked = 0;
static int dump_misc(struct parasite_dump_misc *args) static int dump_misc(struct parasite_dump_misc *args)
{ {
parasite_status_t *st = &args->status;
args->secbits = sys_prctl(PR_GET_SECUREBITS, 0, 0, 0, 0); args->secbits = sys_prctl(PR_GET_SECUREBITS, 0, 0, 0, 0);
args->brk = sys_brk(0); args->brk = sys_brk(0);
args->blocked = old_blocked; args->blocked = old_blocked;
......
...@@ -48,8 +48,6 @@ int collect_pipes(void) ...@@ -48,8 +48,6 @@ int collect_pipes(void)
return -1; return -1;
while (1) { while (1) {
int len;
pi = xmalloc(sizeof(*pi)); pi = xmalloc(sizeof(*pi));
ret = -1; ret = -1;
if (pi == NULL) if (pi == NULL)
...@@ -290,7 +288,6 @@ static int open_pipe(struct file_desc *d) ...@@ -290,7 +288,6 @@ static int open_pipe(struct file_desc *d)
close(sock); close(sock);
out:
close(pfd[!(pi->pe.flags & O_WRONLY)]); close(pfd[!(pi->pe.flags & O_WRONLY)]);
tmp = pfd[pi->pe.flags & O_WRONLY]; tmp = pfd[pi->pe.flags & O_WRONLY];
......
...@@ -16,11 +16,6 @@ void restorer_set_logfd(int fd) ...@@ -16,11 +16,6 @@ void restorer_set_logfd(int fd)
c += 'a' - 10; \ c += 'a' - 10; \
} while (0) } while (0)
static void write_char(char c)
{
sys_write(logfd, &c, 1);
}
void write_string(char *str) void write_string(char *str)
{ {
int len = 0; int len = 0;
...@@ -43,7 +38,6 @@ void write_num(long num) ...@@ -43,7 +38,6 @@ void write_num(long num)
{ {
unsigned long d = 1000000000000000000; unsigned long d = 1000000000000000000;
unsigned int started = 0; unsigned int started = 0;
unsigned int minus = 0;
unsigned int c; unsigned int c;
if (num < 0) { if (num < 0) {
...@@ -78,7 +72,6 @@ long vprint_num(char *buf, long num) ...@@ -78,7 +72,6 @@ long vprint_num(char *buf, long num)
{ {
unsigned long d = 1000000000000000000; unsigned long d = 1000000000000000000;
unsigned int started = 0; unsigned int started = 0;
unsigned int minus = 0;
unsigned int i = 0; unsigned int i = 0;
unsigned int c; unsigned int c;
......
...@@ -37,8 +37,6 @@ static struct task_entries *task_entries; ...@@ -37,8 +37,6 @@ static struct task_entries *task_entries;
static void sigchld_handler(int signal, siginfo_t *siginfo, void *data) static void sigchld_handler(int signal, siginfo_t *siginfo, void *data)
{ {
int status, pid;
write_num(siginfo->si_pid); write_num(siginfo->si_pid);
if (siginfo->si_code & CLD_EXITED) if (siginfo->si_code & CLD_EXITED)
write_string(" exited, status="); write_string(" exited, status=");
...@@ -294,7 +292,6 @@ static u64 restore_mapping(const struct vma_entry *vma_entry) ...@@ -294,7 +292,6 @@ static u64 restore_mapping(const struct vma_entry *vma_entry)
long __export_restore_task(struct task_restore_core_args *args) long __export_restore_task(struct task_restore_core_args *args)
{ {
long ret = -1; long ret = -1;
struct task_entry *task_entry;
struct core_entry *core_entry; struct core_entry *core_entry;
struct vma_entry *vma_entry; struct vma_entry *vma_entry;
u64 va; u64 va;
......
...@@ -23,8 +23,6 @@ void show_saved_shmems(void) ...@@ -23,8 +23,6 @@ void show_saved_shmems(void)
static int collect_shmem(int pid, struct vma_entry *vi) static int collect_shmem(int pid, struct vma_entry *vi)
{ {
int i;
struct shmem_info *entries = rst_shmems->entries;
int nr_shmems = rst_shmems->nr_shmems; int nr_shmems = rst_shmems->nr_shmems;
unsigned long size = vi->pgoff + vi->end - vi->start; unsigned long size = vi->pgoff + vi->end - vi->start;
struct shmem_info *si; struct shmem_info *si;
...@@ -79,8 +77,6 @@ int prepare_shmem_pid(int pid) ...@@ -79,8 +77,6 @@ int prepare_shmem_pid(int pid)
{ {
int fd, ret = -1; int fd, ret = -1;
struct vma_entry vi; struct vma_entry vi;
struct task_core_entry tc;
struct image_header hdr;
fd = open_image_ro(CR_FD_VMAS, pid); fd = open_image_ro(CR_FD_VMAS, pid);
if (fd < 0) { if (fd < 0) {
...@@ -108,14 +104,12 @@ int prepare_shmem_pid(int pid) ...@@ -108,14 +104,12 @@ int prepare_shmem_pid(int pid)
break; break;
} }
out:
close(fd); close(fd);
return ret; return ret;
} }
static int shmem_wait_and_open(int pid, struct shmem_info *si) static int shmem_wait_and_open(int pid, struct shmem_info *si)
{ {
unsigned long time = 1;
char path[128]; char path[128];
int ret; int ret;
...@@ -164,7 +158,6 @@ static int restore_shmem_content(void *addr, struct shmem_info *si) ...@@ -164,7 +158,6 @@ static int restore_shmem_content(void *addr, struct shmem_info *si)
int get_shmem_fd(int pid, struct vma_entry *vi) int get_shmem_fd(int pid, struct vma_entry *vi)
{ {
struct shmem_info *si; struct shmem_info *si;
int sh_fd;
void *addr; void *addr;
int f; int f;
...@@ -278,7 +271,6 @@ int add_shmem_area(pid_t pid, struct vma_entry *vma) ...@@ -278,7 +271,6 @@ int add_shmem_area(pid_t pid, struct vma_entry *vma)
int cr_dump_shmem(void) int cr_dump_shmem(void)
{ {
int err, fd; int err, fd;
struct cr_fdset *cr_fdset = NULL;
unsigned char *map = NULL; unsigned char *map = NULL;
void *addr = NULL; void *addr = NULL;
struct shmem_info_dump *si; struct shmem_info_dump *si;
......
...@@ -33,8 +33,6 @@ int read_sk_queues(void) ...@@ -33,8 +33,6 @@ int read_sk_queues(void)
return -1; return -1;
while (1) { while (1) {
struct sk_packet_entry tmp;
pkt = xmalloc(sizeof(*pkt)); pkt = xmalloc(sizeof(*pkt));
if (!pkt) { if (!pkt) {
pr_err("Failed to allocate packet header\n"); pr_err("Failed to allocate packet header\n");
......
...@@ -96,7 +96,7 @@ err1: ...@@ -96,7 +96,7 @@ err1:
static void tcp_unlock_one(struct inet_sk_desc *sk) static void tcp_unlock_one(struct inet_sk_desc *sk)
{ {
int ret, aux = 0; int ret;
list_del(&sk->rlist); list_del(&sk->rlist);
......
...@@ -222,7 +222,7 @@ err: ...@@ -222,7 +222,7 @@ err:
static int unix_collect_one(const struct unix_diag_msg *m, static int unix_collect_one(const struct unix_diag_msg *m,
struct rtattr **tb) struct rtattr **tb)
{ {
struct unix_sk_desc *d, **h; struct unix_sk_desc *d;
d = xzalloc(sizeof(*d)); d = xzalloc(sizeof(*d));
if (!d) if (!d)
...@@ -365,7 +365,6 @@ int unix_receive_one(struct nlmsghdr *h) ...@@ -365,7 +365,6 @@ int unix_receive_one(struct nlmsghdr *h)
int fix_external_unix_sockets(void) int fix_external_unix_sockets(void)
{ {
struct unix_sk_desc *sk; struct unix_sk_desc *sk;
int i, ret = -1;
pr_debug("Dumping external sockets\n"); pr_debug("Dumping external sockets\n");
......
...@@ -241,7 +241,6 @@ int collect_sockets(void) ...@@ -241,7 +241,6 @@ int collect_sockets(void)
{ {
int err = 0, tmp; int err = 0, tmp;
int nl; int nl;
int supp_type = 0;
struct { struct {
struct nlmsghdr hdr; struct nlmsghdr hdr;
union { union {
...@@ -327,7 +326,7 @@ int collect_sockets(void) ...@@ -327,7 +326,7 @@ int collect_sockets(void)
tmp = collect_sockets_nl(nl, &req, sizeof(req), inet6_udplite_receive_one); tmp = collect_sockets_nl(nl, &req, sizeof(req), inet6_udplite_receive_one);
if (tmp) if (tmp)
err = tmp; err = tmp;
out:
close(nl); close(nl);
return err; return err;
} }
...@@ -395,8 +394,6 @@ static void sk_show_timeval(char *name, u64 *tmo) ...@@ -395,8 +394,6 @@ static void sk_show_timeval(char *name, u64 *tmo)
void show_socket_opts(struct sk_opts_entry *soe) void show_socket_opts(struct sk_opts_entry *soe)
{ {
struct sk_option *o;
pr_msg("\t"); pr_msg("\t");
pr_msg("sndbuf: %u ", soe->so_sndbuf); pr_msg("sndbuf: %u ", soe->so_sndbuf);
......
...@@ -70,7 +70,6 @@ static int read_uts_str(int fd, char *n, int size) ...@@ -70,7 +70,6 @@ static int read_uts_str(int fd, char *n, int size)
int prepare_utsns(int pid) int prepare_utsns(int pid)
{ {
int fd, ret; int fd, ret;
u32 len;
char hostname[65]; char hostname[65];
char domainname[65]; char domainname[65];
......
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