From bdabf56a92f4962c10b36d804a34aff8518b1cca Mon Sep 17 00:00:00 2001 From: Nigel Babu Date: Mon, 27 Feb 2017 11:07:16 +0530 Subject: 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 Reviewed-on: https://review.gluster.org/16766 Smoke: Gluster Build System Reviewed-by: Atin Mukherjee NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System --- xlators/mgmt/glusterd/src/glusterd-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators/mgmt/glusterd/src') 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) -- cgit