]> git.proxmox.com Git - mirror_lxcfs.git/commitdiff
proc_fuse: Fix get_swap_info typo swtotal == 0 -> *swtotal == 0
authorAlex Hudspith <alex@hudspith.io>
Mon, 6 Nov 2023 09:17:38 +0000 (09:17 +0000)
committerAlexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Wed, 27 Mar 2024 12:34:41 +0000 (13:34 +0100)
Signed-off-by: Alex Hudspith <alex@hudspith.io>
src/proc_fuse.c

index 1d253bbad5f8a7923bf3015144792d0ea8084d7e..cb2fca2e832c12635f0cdd30a28cf55467c64508 100644 (file)
@@ -375,7 +375,7 @@ static void get_swap_info(const char *cgroup, uint64_t memlimit,
                                *swtotal = 0;
                        else
                                *swtotal = (memswlimit - memlimit) / 1024;
-                       if (memusage > memswusage || swtotal == 0)
+                       if (memusage > memswusage || *swtotal == 0)
                                *swusage = 0;
                        else
                                *swusage = (memswusage - memusage) / 1024;