diff options
-rw-r--r-- | apt-private/private-list.cc | 5 | ||||
-rw-r--r-- | apt-private/private-list.h | 2 | ||||
-rw-r--r-- | cmdline/apt.cc | 2 |
3 files changed, 4 insertions, 5 deletions
diff --git a/apt-private/private-list.cc b/apt-private/private-list.cc index 7664ca134..b053cbcbe 100644 --- a/apt-private/private-list.cc +++ b/apt-private/private-list.cc @@ -99,14 +99,13 @@ static void ListAllVersions(pkgCacheFile &CacheFile, pkgRecords &records,/*{{{*/ /*}}}*/ // list - list package based on criteria /*{{{*/ // --------------------------------------------------------------------- -bool List(CommandLine &Cmd) +bool DoList(CommandLine &Cmd) { pkgCacheFile CacheFile; pkgCache *Cache = CacheFile.GetPkgCache(); - pkgRecords records(CacheFile); - if (unlikely(Cache == NULL)) return false; + pkgRecords records(CacheFile); const char **patterns; const char *all_pattern[] = { "*", NULL}; diff --git a/apt-private/private-list.h b/apt-private/private-list.h index 461f527cb..aa2677764 100644 --- a/apt-private/private-list.h +++ b/apt-private/private-list.h @@ -5,7 +5,7 @@ class CommandLine; -APT_PUBLIC bool List(CommandLine &Cmd); +APT_PUBLIC bool DoList(CommandLine &Cmd); #endif diff --git a/cmdline/apt.cc b/cmdline/apt.cc index 778ca5a80..4813861a4 100644 --- a/cmdline/apt.cc +++ b/cmdline/apt.cc @@ -70,7 +70,7 @@ int main(int argc, const char *argv[]) /*{{{*/ { CommandLine::Dispatch Cmds[] = { // query - {"list",&List}, + {"list",&DoList}, {"search", &FullTextSearch}, {"show", &APT::Cmd::ShowPackage}, |