From: Teemu Toivola Date: Wed, 13 Aug 2014 18:28:07 +0000 (+0300) Subject: fix test findings X-Git-Tag: v1.12~19 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8001091d260e77d0cd3095cfbc8c02be6cb9b089;p=vnstat fix test findings --- diff --git a/src/daemon.c b/src/daemon.c index 880ab29..eb0b2a9 100644 --- a/src/daemon.c +++ b/src/daemon.c @@ -322,6 +322,8 @@ void initdstate(DSTATE *s) s->prevdbupdate = 0; s->prevdbsave = 0; s->dbcount = 0; + s->dodbsave = 0; + s->datalist = NULL; } void preparedatabases(DSTATE *s) diff --git a/tests/daemon_tests.c b/tests/daemon_tests.c index 5b6391d..654f424 100644 --- a/tests/daemon_tests.c +++ b/tests/daemon_tests.c @@ -580,6 +580,7 @@ START_TEST(processdatalist_filled_does_things) ck_assert_int_eq(cacheupdate(), 1); strcpy(data.interface, "foo"); s.dbcount = 5; + s.dodbsave = 1; s.datalist = dataptr; processdatalist(&s);