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/mount/fuse/src/fuse-bridge.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'xlators/mount') 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, -- cgit