From c69e8370947d765dd94f142d18dc11d5a76af443 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 9 Jun 2015 15:15:33 +0200 Subject: replace ULONG_MAX with c++ style std::numeric_limits MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For some reason travis seems to be unhappy about it claiming it is not defined. Well, lets not think to deeply about it… Git-Dch: Ignore --- methods/rred.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'methods') diff --git a/methods/rred.cc b/methods/rred.cc index 12cf2b4a5..54123ab9c 100644 --- a/methods/rred.cc +++ b/methods/rred.cc @@ -405,12 +405,12 @@ class Patch { 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::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::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); -- cgit v1.2.3