Recent changes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The following changes since commit 5480f591a58df0e873ab80ba21e7b81b9a6fa0c5:

  Merge branch 'master' of ssh://router.home.kernel.dk/data/git/blktrace (2011-01-11 08:36:21 +0100)

are available in the git repository at:

  git://git.kernel.dk/blktrace.git master

Tao Ma (1):
      blkiomon: Fix an output error

 stats.h |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

---

Diff of recent changes:

diff --git a/stats.h b/stats.h
index fdedf27..5b9a313 100644
--- a/stats.h
+++ b/stats.h
@@ -75,6 +75,9 @@ static inline void minmax_to_be(struct minmax *mm)
 
 static inline double minmax_avg(struct minmax *mm)
 {
+	if (!mm->num)
+		return 0;
+
 	return (mm->sum / (double)mm->num);
 }
 
@@ -82,6 +85,9 @@ static inline double minmax_var(struct minmax *mm)
 {
 	double num = (double)mm->num;
 
+	if (!mm->num)
+		return 0;
+
 	return ((mm->sos - ((mm->sum * mm->sum) / num)) / num);
 }
 
--
To unsubscribe from this list: send the line "unsubscribe linux-btrace" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux