summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd
diff options
context:
space:
mode:
authorJeff Darcy <jdarcy@fb.com>2017-10-31 09:56:11 -0700
committerAmar Tumballi <amarts@redhat.com>2017-11-03 05:04:11 +0000
commit8e973d3ab96d290a32ae3fdbdd1cf867b7060483 (patch)
treedc20dca53f16dba3489d65837007e87bb4c84650 /xlators/mgmt/glusterd
parent917f84b01ff4c485ce548f0daa3d3d51dc81c195 (diff)
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 <jdarcy@fb.com>
Diffstat (limited to 'xlators/mgmt/glusterd')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c4
1 files changed, 3 insertions, 1 deletions
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);