diff options
author | Max Kellermann <max@duempel.org> | 2013-10-19 16:12:52 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-10-19 16:12:52 +0200 |
commit | efcd9dfc35db504f403460796f1045977170fe90 (patch) | |
tree | 29bb8ed8a3ada7f813e1f8d55bc6c70d3e2770b1 /src/ConfigData.cxx | |
parent | db44a6e94819ec106daa5de726968d9c881107f3 (diff) | |
download | mpd-efcd9dfc35db504f403460796f1045977170fe90.tar.gz mpd-efcd9dfc35db504f403460796f1045977170fe90.tar.xz mpd-efcd9dfc35db504f403460796f1045977170fe90.zip |
ConfigData: use strtoul() in GetUnsignedValue()
Lifts the artificial 31 bit limit in i386 where
sizeof(long)==sizeof(int).
Diffstat (limited to '')
-rw-r--r-- | src/ConfigData.cxx | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/ConfigData.cxx b/src/ConfigData.cxx index 9712eef3e..c6cabee6e 100644 --- a/src/ConfigData.cxx +++ b/src/ConfigData.cxx @@ -44,13 +44,10 @@ unsigned block_param::GetUnsignedValue() const { char *endptr; - long value2 = strtol(value.c_str(), &endptr, 0); + unsigned long value2 = strtoul(value.c_str(), &endptr, 0); if (*endptr != 0) FormatFatalError("Not a valid number in line %i", line); - if (value2 < 0) - FormatFatalError("Not a positive number in line %i", line); - return (unsigned)value2; } |