Code

swap plugin: Don't report an error if there is no swap space on Linux.
[collectd.git] / src / swap.c
index 629d1a1e747fd516439123dee4e2e84a3806a38e..30daa4b118329f7556d0d578a9ec0d0369dfc787 100644 (file)
@@ -239,7 +239,7 @@ static int swap_read (void) /* {{{ */
                                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);