From 8dd18bd620ab676d8bba00813f5b85267bf7e00e Mon Sep 17 00:00:00 2001 From: Martin Kobetic Date: Tue, 24 Jun 2014 17:19:50 +0000 Subject: [PATCH] review tweaks --- db.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/db.go b/db.go index a37f687..d15dc74 100644 --- a/db.go +++ b/db.go @@ -577,7 +577,11 @@ type Stats struct { func (s *Stats) Sub(other *Stats) Stats { var diff Stats if s == nil { - return diff + if other == nil { + return diff + } else { + return *other + } } diff = *s if other == nil {