diff options
author | Martin Kobetic <mkobetic@gmail.com> | 2014-06-24 17:54:40 +0000 |
---|---|---|
committer | Martin Kobetic <mkobetic@gmail.com> | 2014-06-24 17:54:40 +0000 |
commit | bae0fbd29027eb56cb70067098041cf31483fca8 (patch) | |
tree | 4550fc51889f26df3d5087714fd917288a5c6ee7 | |
parent | drop the *s guard (diff) | |
download | dedo-bae0fbd29027eb56cb70067098041cf31483fca8.tar.gz dedo-bae0fbd29027eb56cb70067098041cf31483fca8.tar.xz |
review tweaks
-rw-r--r-- | db.go | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -575,11 +575,11 @@ type Stats struct { // This is useful when obtaining stats at two different points and time and // you need the performance counters that occurred within that time span. func (s *Stats) Sub(other *Stats) Stats { - var diff = *s if other == nil { - return diff + return *s } - diff.TxN = other.TxN - diff.TxN + var diff Stat + diff.TxN = other.TxN - s.TxN diff.TxStats = s.TxStats.Sub(&other.TxStats) return diff } |