summaryrefslogtreecommitdiff
path: root/cmdline/apt-cache.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2019-07-08 15:48:59 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2019-07-08 15:51:17 +0200
commit2b734a7ec429825c7007c1093883229e069d36c7 (patch)
treeb67360f3201634c82f5a9e7dd84f47b28fa63acb /cmdline/apt-cache.cc
parentcbe90ee516d7f747f981e423f164f99eb767240b (diff)
Apply various suggestions by cppcheck
Reported-By: cppcheck
Diffstat (limited to 'cmdline/apt-cache.cc')
-rw-r--r--cmdline/apt-cache.cc15
1 files changed, 7 insertions, 8 deletions
diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc
index 499c9edc9..acf00bdda 100644
--- a/cmdline/apt-cache.cc
+++ b/cmdline/apt-cache.cc
@@ -136,12 +136,12 @@ static bool DumpPackage(CommandLine &CmdL)
/* */
static map_pointer_t PackageNext(pkgCache::Package const * const P) { return P->NextPackage; }
static map_pointer_t GroupNext(pkgCache::Group const * const G) { return G->Next; }
-template<class T>
-static void ShowHashTableStats(std::string Type,
- T *StartP,
- map_pointer_t *Hashtable,
- unsigned long Size,
- map_pointer_t(*Next)(T const * const))
+template <class T>
+static void ShowHashTableStats(char const *const Type,
+ T *StartP,
+ map_pointer_t *Hashtable,
+ unsigned long Size,
+ map_pointer_t (*Next)(T const *const))
{
// hashtable stats for the HashTable
unsigned long NumBuckets = Size;
@@ -201,8 +201,7 @@ static bool Stats(CommandLine &CmdL)
int NVirt = 0;
int DVirt = 0;
int Missing = 0;
- pkgCache::PkgIterator I = Cache->PkgBegin();
- for (;I.end() != true; ++I)
+ for (pkgCache::PkgIterator I = Cache->PkgBegin(); I.end() != true; ++I)
{
if (I->VersionList != 0 && I->ProvidesList == 0)
{