Skip to content

Commit

Permalink
ua_prune.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 d136d4e commit 16a4be4
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions core/src/dird/ua_prune.cc
Expand Up @@ -3,7 +3,7 @@
Copyright (C) 2002-2009 Free Software Foundation Europe e.V.
Copyright (C) 2011-2016 Planets Communications B.V.
Copyright (C) 2013-2016 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 @@ -44,6 +44,8 @@

namespace directordaemon {

static const ClientDbRecord emptyClientDbRecord = {};

/* Forward referenced functions */
static bool PruneDirectory(UaContext* ua, ClientResource* client);
static bool PruneStats(UaContext* ua, utime_t retention);
Expand Down Expand Up @@ -128,9 +130,6 @@ bool PruneCmd(UaContext* ua, const char* cmd)

if (!OpenClientDb(ua, true)) { return false; }

memset(&pr, 0, sizeof(pr));
memset(&mr, 0, sizeof(mr));

/*
* First search args
*/
Expand Down Expand Up @@ -339,8 +338,7 @@ static bool PruneDirectory(UaContext* ua, ClientResource* client)

if (client) {
char ed1[50];

memset(&cr, 0, sizeof(cr));
cr = emptyClientDbRecord;
bstrncpy(cr.Name, client->resource_name_, sizeof(cr.Name));
if (!ua->db->CreateClientRecord(ua->jcr, &cr)) { goto bail_out; }

Expand Down

0 comments on commit 16a4be4

Please sign in to comment.