]> granicus.if.org Git - vnstat/commitdiff
fix test findings
authorTeemu Toivola <git@humdi.net>
Wed, 13 Aug 2014 18:28:07 +0000 (21:28 +0300)
committerTeemu Toivola <git@humdi.net>
Wed, 13 Aug 2014 18:28:07 +0000 (21:28 +0300)
src/daemon.c
tests/daemon_tests.c

index 880ab295cff3b54d2008d0f93438488fe8e9be6f..eb0b2a96efa2ad1d2e838874f56143f03ed254ae 100644 (file)
@@ -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)
index 5b6391dd9959b5653da02bae653ada57553b9d38..654f424bb724db08f051f22fa7bbe7cee48f57af 100644 (file)
@@ -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);