Skip to content

Commit

Permalink
dird.cc: fix class-memaccess warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
pstorz authored and franku committed Nov 5, 2019
1 parent 5af3fd6 commit 2419949
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions core/src/dird/dird.cc
Expand Up @@ -3,7 +3,7 @@
Copyright (C) 2000-2012 Free Software Foundation Europe e.V.
Copyright (C) 2011-2016 Planets Communications B.V.
Copyright (C) 2013-2018 Bareos GmbH & Co. KG
Copyright (C) 2013-2019 Bareos GmbH & Co. KG
This program is Free Software; you can redistribute it and/or
modify it under the terms of version three of the GNU Affero General Public
Expand Down Expand Up @@ -67,6 +67,9 @@ using namespace directordaemon;

/* Forward referenced subroutines */
namespace directordaemon {

static const ClientDbRecord emptyClientDbRecord = {};

#if !defined(HAVE_WIN32)
static
#endif
Expand Down Expand Up @@ -552,7 +555,6 @@ static bool InitSighandlerSighup()
sigemptyset(&block_mask);
sigaddset(&block_mask, SIGHUP);

memset(&action, 0, sizeof(action));
action.sa_sigaction = SighandlerReloadConfig;
action.sa_mask = block_mask;
action.sa_flags = SA_SIGINFO;
Expand Down Expand Up @@ -993,7 +995,7 @@ static bool CheckCatalog(cat_op mode)
}
Dmsg2(500, "create cat=%s for client=%s\n",
client->catalog->resource_name_, client->resource_name_);
memset(&cr, 0, sizeof(cr));
cr = emptyClientDbRecord;
bstrncpy(cr.Name, client->resource_name_, sizeof(cr.Name));
db->CreateClientRecord(NULL, &cr);
}
Expand All @@ -1003,8 +1005,6 @@ static bool CheckCatalog(cat_op mode)
foreach_res (store, R_STORAGE) {
StorageDbRecord sr;
MediaTypeDbRecord mtr;
memset(&sr, 0, sizeof(sr));
memset(&mtr, 0, sizeof(mtr));
if (store->media_type) {
bstrncpy(mtr.MediaType, store->media_type, sizeof(mtr.MediaType));
mtr.ReadOnly = 0;
Expand Down

0 comments on commit 2419949

Please sign in to comment.