summaryrefslogtreecommitdiffstats
path: root/scheduler/nufa/src/nufa.c
diff options
context:
space:
mode:
Diffstat (limited to 'scheduler/nufa/src/nufa.c')
-rw-r--r--scheduler/nufa/src/nufa.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/scheduler/nufa/src/nufa.c b/scheduler/nufa/src/nufa.c
index b79241a5055..790704a8fc7 100644
--- a/scheduler/nufa/src/nufa.c
+++ b/scheduler/nufa/src/nufa.c
@@ -89,14 +89,16 @@ nufa_init (xlator_t *xl)
nufa_buf->min_free_disk = NUFA_LIMITS_MIN_FREE_DISK_DEFAULT;
}
data = dict_get (xl->options, "scheduler.refresh-interval");
- if (data && (gf_string2time (data->data,
- &nufa_buf->refresh_interval) != 0)) {
- gf_log ("nufa", GF_LOG_ERROR,
- "invalid number format \"%s\" of "
- "\"option scheduler.refresh-interval\"",
- data->data);
- return -1;
- } else {
+ if (data != NULL) {
+ if (gf_string2time (data->data,
+ &nufa_buf->refresh_interval) != 0) {
+ gf_log ("nufa", GF_LOG_ERROR,
+ "invalid number format \"%s\" of "
+ "\"option scheduler.refresh-interval\"",
+ data->data);
+ return -1;
+ }
+ } else {
gf_log ("nufa", GF_LOG_WARNING,
"No option for scheduler.refresh-interval given, "
"defaulting it to 30");