ctdb-protocol: Use wrapper for string to integer conversion
authorSwen Schillig <swen@linux.ibm.com>
Tue, 29 Jan 2019 12:03:20 +0000 (13:03 +0100)
committerJeremy Allison <jra@samba.org>
Fri, 1 Mar 2019 00:32:10 +0000 (00:32 +0000)
commite96bccc879a675856b3a875db2d718445410caea
tree8fc364e953432ca0cf92a5a40f4a68816f7b493c
parent414bc3748b6fbd54cbd50a0ff1f20cbe31b06ccc
ctdb-protocol: 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/protocol/protocol_util.c