summaryrefslogtreecommitdiff
path: root/apt-private/private-search.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2017-12-13 12:28:22 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2017-12-13 23:53:15 +0100
commitd812245dd5ac9268ef060a243ac978074504ecca (patch)
tree6f3698870bf2008b26f63b008c42a742d43482af /apt-private/private-search.cc
parent594ee572949bee6abb36d956af1b9c8a7d100803 (diff)
clearing object via constructor instead of memset
Reported-By: gcc -Wclass-memaccess Gbp-Dch: Ignore
Diffstat (limited to 'apt-private/private-search.cc')
-rw-r--r--apt-private/private-search.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-private/private-search.cc b/apt-private/private-search.cc
index b850339f9..7ec1915a8 100644
--- a/apt-private/private-search.cc
+++ b/apt-private/private-search.cc
@@ -164,6 +164,7 @@ struct ExDescFile
pkgCache::DescFile *Df;
pkgCache::VerIterator V;
map_id_t ID;
+ ExDescFile() : Df(nullptr), ID(0) {}
};
static bool Search(CommandLine &CmdL)
{
@@ -203,7 +204,6 @@ static bool Search(CommandLine &CmdL)
size_t const descCount = Cache->HeaderP->GroupCount + 1;
ExDescFile *DFList = new ExDescFile[descCount];
- memset(DFList,0,sizeof(*DFList) * descCount);
bool *PatternMatch = new bool[descCount * NumPatterns];
memset(PatternMatch,false,sizeof(*PatternMatch) * descCount * NumPatterns);