From: Simon Kuhnle Date: Mon, 16 Feb 2009 12:06:06 +0000 (+0100) Subject: swap plugin: Fix another typo in the *BSD code. X-Git-Tag: collectd-4.6.0~18 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=e7d2edfbb7b016199c2083cde4edbfacadbf1c0f;p=collectd.git swap plugin: Fix another typo in the *BSD code. --- diff --git a/src/swap.c b/src/swap.c index 24289abd..bcfe4a22 100644 --- a/src/swap.c +++ b/src/swap.c @@ -308,8 +308,8 @@ static int swap_read (void) if ((swap_entries[i].se_flags & SWF_ENABLE) == 0) continue; - used = swap_entries[i].se_inuse * C_SWAP_BLOCK_SIZE; - total = swap_entries[i].se_nblks * C_SWAP_BLOCK_SIZE; + used += swap_entries[i].se_inuse * C_SWAP_BLOCK_SIZE; + total += swap_entries[i].se_nblks * C_SWAP_BLOCK_SIZE; } swap_submit ("used", (gauge_t) used);