Merge pull request #97 from tokkee/sh/swap
authorFlorian Forster <github@nospam.verplant.org>
Mon, 2 Jul 2012 20:00:34 +0000 (13:00 -0700)
committerFlorian Forster <github@nospam.verplant.org>
Mon, 2 Jul 2012 20:00:34 +0000 (13:00 -0700)
swap plugin: Don't report an error if there is no swap space on Linux.

src/swap.c

index 629d1a1..30daa4b 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);