From 8e973d3ab96d290a32ae3fdbdd1cf867b7060483 Mon Sep 17 00:00:00 2001 From: Jeff Darcy Date: Tue, 31 Oct 2017 09:56:11 -0700 Subject: core: make gf_boolean_t a C99 bool instead of an enum This reduces the space used from four bytes to one, and allows new code to use familiar C99 types/values interoperably with our old cruft. It does *not* change current declarations or code; that will be left for a separate - much larger - patch. Updates: #80 Change-Id: I5baedd17d3fb05b38f0d8b8bb9dd62824475842e Signed-off-by: Jeff Darcy --- xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'xlators/mgmt/glusterd/src') diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c b/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c index fc31dd2820b..a61ecab84d6 100644 --- a/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c @@ -968,13 +968,15 @@ gd_import_volume_snap_details (dict_t *dict, glusterd_volinfo_t *volinfo, } snprintf (key, sizeof (key), "%s.is_snap_volume", prefix); - ret = dict_get_uint32 (dict, key, &volinfo->is_snap_volume); + uint32_t is_snap_int; + ret = dict_get_uint32 (dict, key, &is_snap_int); if (ret) { gf_msg (this->name, GF_LOG_ERROR, 0, GD_MSG_DICT_GET_FAILED, "%s missing in payload " "for %s", key, volname); goto out; } + volinfo->is_snap_volume = (is_snap_int != 0); memset (key, 0, sizeof (key)); snprintf (key, sizeof (key), "%s.restored_from_snap", prefix); -- cgit