summaryrefslogtreecommitdiff
path: root/apt-inst/filelist.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@ubuntu.com>2014-04-01 12:28:56 +0200
committerMichael Vogt <mvo@ubuntu.com>2014-04-01 12:28:56 +0200
commitbe20eef52da4b7f361333ea70a8d705a98ae779e (patch)
tree4177a110ce6b1335fc4b85d5e53b298a65661f39 /apt-inst/filelist.cc
parenta555cf8be53d8b5557f004ecbde8482a169b79f3 (diff)
parent21b3eac8f9ab8e12b43fa8998a5aa5465f29adc5 (diff)
Merge remote-tracking branch 'upstream/debian/sid' into feature/apt-manpage
Conflicts: cmdline/apt.cc
Diffstat (limited to 'apt-inst/filelist.cc')
-rw-r--r--apt-inst/filelist.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/apt-inst/filelist.cc b/apt-inst/filelist.cc
index 879c07855..4dbc4a2d7 100644
--- a/apt-inst/filelist.cc
+++ b/apt-inst/filelist.cc
@@ -5,14 +5,14 @@
File Listing - Manages a Cache of File -> Package names.
- Diversions add some signficant complexity to the system. To keep
+ Diversions add some significant complexity to the system. To keep
storage space down in the very special case of a diverted file no
extra bytes are allocated in the Node structure. Instead a diversion
is inserted directly into the hash table and its flag bit set. Every
lookup for that filename will always return the diversion.
The hash buckets are stored in sorted form, with diversions having
- the higest sort order. Identical files are assigned the same file
+ the highest sort order. Identical files are assigned the same file
pointer, thus after a search all of the nodes owning that file can be
found by iterating down the bucket.
@@ -39,8 +39,6 @@
#include <apt-pkg/error.h>
#include <apt-pkg/strutl.h>
-#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
#include <iostream>
#include <apti18n.h>
@@ -87,7 +85,7 @@ pkgFLCache::Header::Header()
// FLCache::Header::CheckSizes - Check if the two headers have same *sz /*{{{*/
// ---------------------------------------------------------------------
/* Compare to make sure we are matching versions */
-bool pkgFLCache::Header::CheckSizes(Header &Against) const
+APT_PURE bool pkgFLCache::Header::CheckSizes(Header &Against) const
{
if (HeaderSz == Against.HeaderSz &&
NodeSz == Against.NodeSz &&
@@ -355,7 +353,7 @@ pkgFLCache::NodeIterator pkgFLCache::GetNode(const char *Name,
// ---------------------------------------------------------------------
/* This is one of two hashing functions. The other is inlined into the
GetNode routine. */
-pkgFLCache::Node *pkgFLCache::HashNode(NodeIterator const &Nde)
+APT_PURE pkgFLCache::Node *pkgFLCache::HashNode(NodeIterator const &Nde)
{
// Hash the node
unsigned long HashPos = 0;
@@ -572,7 +570,7 @@ bool pkgFLCache::AddConfFile(const char *Name,const char *NameEnd,
// ---------------------------------------------------------------------
/* Since the package pointer is indirected in all sorts of interesting ways
this is used to get a pointer to the owning package */
-pkgFLCache::Package *pkgFLCache::NodeIterator::RealPackage() const
+APT_PURE pkgFLCache::Package *pkgFLCache::NodeIterator::RealPackage() const
{
if (Nde->Pointer == 0)
return 0;