summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNigel Babu <nigelb@redhat.com>2017-02-27 11:07:16 +0530
committerJeff Darcy <jdarcy@redhat.com>2017-02-27 18:05:51 -0500
commitbdabf56a92f4962c10b36d804a34aff8518b1cca (patch)
tree35b21985e8c946953d09d48b39ebc7f2cc32698f
parent9c310f7c5ee5e32db349a70120ac82523afb2c51 (diff)
glusterd: Fix the incorrect check
err_str is an array and is therefore never NULL. This condition would always be false. Change-Id: I31eb3338986a3af584e0feca8ec3e16f738378ec BUG: 789278 Signed-off-by: Nigel Babu <nigelb@redhat.com> Reviewed-on: https://review.gluster.org/16766 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index baa2e35b3e5..9df10011a59 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -12000,7 +12000,7 @@ glusterd_get_global_options_for_all_vols (rpcsvc_request_t *req, dict_t *ctx,
out:
if (ret && !all_opts && !key_found) {
- if (err_str == NULL)
+ if (err_str[0] == 0)
snprintf (err_str, sizeof (err_str),
"option %s does not exist", key);
if (*op_errstr == NULL)