summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c00718f)
raw | patch | inline | side by side (parent: c00718f)
author | Sebastian Harl <sh@tokkee.org> | |
Sat, 30 Jun 2012 14:33:09 +0000 (16:33 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Sat, 30 Jun 2012 14:33:09 +0000 (16:33 +0200) |
… rather, simply record zeros in that case. Swap may be switched on and off at
arbitrary times and/or might be added at "later" times. Thus, storing zero in
case the swap plugin is enabled sounds like the best approach to me.
arbitrary times and/or might be added at "later" times. Thus, storing zero in
case the swap plugin is enabled sounds like the best approach to me.
src/swap.c | patch | blob | history |
diff --git a/src/swap.c b/src/swap.c
index 629d1a1e747fd516439123dee4e2e84a3806a38e..30daa4b118329f7556d0d578a9ec0d0369dfc787 100644 (file)
--- a/src/swap.c
+++ b/src/swap.c
sstrerror (errno, errbuf, sizeof (errbuf)));
}
- if ((swap_total == 0LL) || ((swap_free + swap_cached) > swap_total))
+ if ((swap_free + swap_cached) > swap_total)
return (-1);
swap_used = swap_total - (swap_free + swap_cached);