From: David Disseldorp Date: Fri, 1 Mar 2019 15:40:50 +0000 (+0100) Subject: ctdb_mutex_ceph_rados_helper: revert strtoull_err() usage X-Git-Tag: talloc-2.2.0~214 X-Git-Url: http://git.samba.org/samba.git/?p=gd%2Fsamba-autobuild%2F.git;a=commitdiff_plain;h=e7351603890c62829f3e33a9dd471ea373a6c470 ctdb_mutex_ceph_rados_helper: revert strtoull_err() usage Compilation currently fails, as ctdb_mutex_ceph_rados_helper doesn't include or link against the samba-util library. Revert back to the previous strtoull() behaviour, which works fine. Signed-off-by: David Disseldorp Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Fri Mar 1 18:34:18 UTC 2019 on sn-devel-144 --- diff --git a/ctdb/utils/ceph/ctdb_mutex_ceph_rados_helper.c b/ctdb/utils/ceph/ctdb_mutex_ceph_rados_helper.c index a43855008c0..7ef76c26e02 100644 --- a/ctdb/utils/ceph/ctdb_mutex_ceph_rados_helper.c +++ b/ctdb/utils/ceph/ctdb_mutex_ceph_rados_helper.c @@ -301,14 +301,10 @@ int main(int argc, char *argv[]) cmr_state->pool_name = argv[3]; cmr_state->object = argv[4]; if (argc == 6) { - int error = 0; /* optional lock duration provided */ char *endptr = NULL; - cmr_state->lock_duration_s = strtoull_err(argv[5], - &endptr, - 0, - &error); - if ((endptr == argv[5]) || (*endptr != '\0') || (error != 0)) { + cmr_state->lock_duration_s = strtoull(argv[5], &endptr, 0); + if ((endptr == argv[5]) || (*endptr != '\0')) { fprintf(stdout, CTDB_MUTEX_STATUS_ERROR); ret = -EINVAL; goto err_ctx_cleanup;