From c68d906ac7d1dec6898b0f576bb6c3fc44003b62 Mon Sep 17 00:00:00 2001 From: Christian Beer Date: Wed, 29 May 2019 20:48:05 +0200 Subject: [PATCH] Server: initialize struct members found by Coverity (CIDs 27931 27957 278928) --- db/boinc_db.cpp | 8 ++++++-- sched/db_purge.cpp | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/db/boinc_db.cpp b/db/boinc_db.cpp index 918587e685..e5a6bbaf91 100644 --- a/db/boinc_db.cpp +++ b/db/boinc_db.cpp @@ -151,9 +151,13 @@ DB_USER_SUBMIT::DB_USER_SUBMIT(DB_CONN* dc) : DB_STATE_COUNTS::DB_STATE_COUNTS(DB_CONN* dc) : DB_BASE("state_counts", dc?dc:&boinc_db){} DB_TRANSITIONER_ITEM_SET::DB_TRANSITIONER_ITEM_SET(DB_CONN* dc) : - DB_BASE_SPECIAL(dc?dc:&boinc_db){} + DB_BASE_SPECIAL(dc?dc:&boinc_db) { + nitems_this_query = 0; +} DB_VALIDATOR_ITEM_SET::DB_VALIDATOR_ITEM_SET(DB_CONN* dc) : - DB_BASE_SPECIAL(dc?dc:&boinc_db){} + DB_BASE_SPECIAL(dc?dc:&boinc_db) { + nitems_this_query = 0; +} DB_WORK_ITEM::DB_WORK_ITEM(DB_CONN* dc) : DB_BASE_SPECIAL(dc?dc:&boinc_db ){ diff --git a/sched/db_purge.cpp b/sched/db_purge.cpp index 089d958fc1..2d41a2c5a7 100644 --- a/sched/db_purge.cpp +++ b/sched/db_purge.cpp @@ -269,6 +269,7 @@ void fail(const char* msg) { void open_archive(const char* filename_prefix, void*& f){ char path[MAXPATHLEN]; char command[MAXPATHLEN+512]; + sprintf(command, "/bin/false"); if (daily_dir) { time_t time_time = time_int;