ctdb_mutex_ceph_rados_helper: revert strtoull_err() usage
authorDavid Disseldorp <ddiss@samba.org>
Fri, 1 Mar 2019 15:40:50 +0000 (16:40 +0100)
committerJeremy Allison <jra@samba.org>
Fri, 1 Mar 2019 18:34:18 +0000 (18:34 +0000)
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 <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Mar  1 18:34:18 UTC 2019 on sn-devel-144

ctdb/utils/ceph/ctdb_mutex_ceph_rados_helper.c

index a43855008c031b9d2f9aeaa6e9624fe3ec8d7098..7ef76c26e02826eac43f49d37d69a244cb16ab40 100644 (file)
@@ -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;