ctdb-utils: Use wrapper for string to integer conversion
authorSwen Schillig <swen@linux.ibm.com>
Wed, 30 Jan 2019 09:28:52 +0000 (10:28 +0100)
committerJeremy Allison <jra@samba.org>
Fri, 1 Mar 2019 00:32:11 +0000 (00:32 +0000)
commitfa2c919e1d05a2033ce1cb41a86f8bdd789d68b8
tree20afced76c05cdc9277c3eb25726c2f4a7492737
parent2b2ff12e706d999ff2d84affa79c64b33cc289a7
ctdb-utils: Use wrapper for string to integer conversion

In order to detect an value overflow error during
the string to integer conversion with strtoul/strtoull,
the errno variable must be set to zero before the execution and
checked after the conversion is performed. This is achieved by
using the wrapper function strtoul_err and strtoull_err.

Signed-off-by: Swen Schillig <swen@linux.ibm.com>
Reviewed-by: Ralph Böhme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
ctdb/utils/ceph/ctdb_mutex_ceph_rados_helper.c