summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/dict.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libglusterfs/src/dict.c b/libglusterfs/src/dict.c
index f2df5a6..e9fc122 100644
--- a/libglusterfs/src/dict.c
+++ b/libglusterfs/src/dict.c
@@ -1121,8 +1121,8 @@ dict_foreach (dict_t *dict,
while (pairs) {
next = pairs->next;
ret = fn (dict, pairs->key, pairs->value, data);
- if (ret == -1)
- return -1;
+ if (ret < 0)
+ return ret;
pairs = next;
}