]> git.proxmox.com Git - mirror_lxcfs.git/commitdiff
swap: Remove now unused variable
authorStéphane Graber <stgraber@ubuntu.com>
Thu, 5 Nov 2020 20:46:07 +0000 (15:46 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Thu, 5 Nov 2020 20:51:04 +0000 (15:51 -0500)
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
src/proc_fuse.c

index fc69789f8ef2468c7a0647702df7f05434276f3e..9bf963b78e970b68689253758f5bda075b91dd3f 100644 (file)
@@ -325,7 +325,7 @@ static int proc_swaps_read(char *buf, size_t size, off_t offset,
        bool wants_swap = opts && !opts->swap_off && liblxcfs_can_use_swap();
        struct file_info *d = INTTYPE_TO_PTR(fi->fh);
        uint64_t memswlimit = 0, memlimit = 0, memusage = 0, memswusage = 0,
-                swtotal = 0, swfree = 0, swusage = 0, memswpriority = 1
+                swtotal = 0, swusage = 0, memswpriority = 1,
                 hostswtotal = 0, hostswfree = 0;
        ssize_t total_len = 0;
        ssize_t l = 0;
@@ -383,8 +383,6 @@ static int proc_swaps_read(char *buf, size_t size, off_t offset,
                                        swusage = 0;
                                else
                                        swusage = (memswusage - memusage) / 1024;
-                               if (swtotal >= swusage)
-                                       swfree = swtotal - swusage;
                        }
 
                        ret = cgroup_ops->get_memory_swappiness(cgroup_ops, cgroup, &memswpriority_str);