size_t s, e;
errno = 0;
s = strtoul(buffer, &m, 10);
- if (unlikely(m == buffer || s == ULONG_MAX || errno != 0))
+ if (unlikely(m == buffer || s == std::numeric_limits<unsigned long>::max() || errno != 0))
return _error->Error("Parsing patchfile %s failed: Expected an effected line start", f.Name().c_str());
else if (*m == ',') {
++m;
e = strtol(m, &c, 10);
- if (unlikely(m == c || e == ULONG_MAX || errno != 0))
+ if (unlikely(m == c || e == std::numeric_limits<unsigned long>::max() || errno != 0))
return _error->Error("Parsing patchfile %s failed: Expected an effected line end", f.Name().c_str());
if (unlikely(e < s))
return _error->Error("Parsing patchfile %s failed: Effected lines end %lu is before start %lu", f.Name().c_str(), e, s);
}
protected:
- virtual bool URIAcquire(std::string const &Message, FetchItem *Itm) {
+ virtual bool URIAcquire(std::string const &Message, FetchItem *Itm) APT_OVERRIDE {
Debug = _config->FindB("Debug::pkgAcquire::RRed", false);
URI Get = Itm->Uri;
std::string Path = Get.Host + Get.Path; // rred:/path - no host
p.Close();
HashStringList const hsl = patch_hash.GetHashStringList();
if (hsl != I->ExpectedHashes)
- return _error->Error("Patch %s doesn't have the expected hashsum", patch_name.c_str());
+ return _error->Error("Hash Sum mismatch for uncompressed patch %s", patch_name.c_str());
}
if (Debug == true)
return true;
}
- bool Configuration(std::string Message)
+ bool Configuration(std::string Message) APT_OVERRIDE
{
if (pkgAcqMethod::Configuration(Message) == false)
return false;