diff options
author | Jeff Darcy <jdarcy@fb.com> | 2017-10-31 09:56:11 -0700 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2017-11-03 05:04:11 +0000 |
commit | 8e973d3ab96d290a32ae3fdbdd1cf867b7060483 (patch) | |
tree | dc20dca53f16dba3489d65837007e87bb4c84650 /xlators/mount | |
parent | 917f84b01ff4c485ce548f0daa3d3d51dc81c195 (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/mount')
-rw-r--r-- | xlators/mount/fuse/src/fuse-bridge.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c index 6c6506009cb..50ac9931a5a 100644 --- a/xlators/mount/fuse/src/fuse-bridge.c +++ b/xlators/mount/fuse/src/fuse-bridge.c @@ -5583,8 +5583,11 @@ init (xlator_t *this_xl) priv->direct_io_mode = 2; ret = dict_get_str (options, ZR_DIRECT_IO_OPT, &value_string); if (ret == 0) { - ret = gf_string2boolean (value_string, &priv->direct_io_mode); - GF_ASSERT (ret == 0); + gf_boolean_t direct_io_mode_bool; + ret = gf_string2boolean (value_string, &direct_io_mode_bool); + if (ret == 0) { + priv->direct_io_mode = direct_io_mode_bool ? 1 : 0; + } } GF_OPTION_INIT (ZR_STRICT_VOLFILE_CHECK, priv->strict_volfile_check, |