From 2a79d5b560398427f5538865099b6777128d8bed Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 14 Feb 2011 17:03:35 +0100 Subject: * apt-pkg/contrib/fileutl.cc: - really detect bigendian machines by including config.h, so we can really (Closes: #612986) * apt-pkg/contrib/mmap.cc: - Base has as 'valid' failure states 0 and -1 so add a simple validData method to check for failure states --- apt-pkg/contrib/mmap.h | 1 + 1 file changed, 1 insertion(+) (limited to 'apt-pkg/contrib/mmap.h') diff --git a/apt-pkg/contrib/mmap.h b/apt-pkg/contrib/mmap.h index e9baa9339..2bf2c1540 100644 --- a/apt-pkg/contrib/mmap.h +++ b/apt-pkg/contrib/mmap.h @@ -62,6 +62,7 @@ class MMap inline void *Data() {return Base;}; inline unsigned long Size() {return iSize;}; inline void AddSize(unsigned long const size) {iSize += size;}; + inline bool validData() const { return Base != (void *)-1 && Base != 0; }; // File manipulators bool Sync(); -- cgit v1.2.3