summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/xlator.c
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs/src/xlator.c')
-rw-r--r--libglusterfs/src/xlator.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/libglusterfs/src/xlator.c b/libglusterfs/src/xlator.c
index 090fbc727..986608153 100644
--- a/libglusterfs/src/xlator.c
+++ b/libglusterfs/src/xlator.c
@@ -45,6 +45,8 @@
} while (0)
+#define GF_OPTION_LIST_EMPTY(_opt) (_opt->value[0] == NULL)
+
static void
fill_defaults (xlator_t *xl)
{
@@ -246,10 +248,10 @@ _volume_option_value_validate (xlator_t *xl,
case GF_OPTION_TYPE_STR:
{
/* Check if the '*str' is valid */
- if (!opt->value) {
- ret = 0;
- goto out;
- }
+ if (GF_OPTION_LIST_EMPTY(opt)) {
+ ret = 0;
+ goto out;
+ }
for (i = 0; (i < ZR_OPTION_MAX_ARRAY_SIZE) &&
opt->value[i]; i++) {