summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-brick-ops.c2
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c3
2 files changed, 2 insertions, 3 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c
index 991a4d2b59e..5591070f32f 100644
--- a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c
+++ b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c
@@ -2954,7 +2954,7 @@ glusterd_op_remove_brick (dict_t *dict, char **op_errstr)
}
while ( i <= count) {
- snprintf (key, 256, "brick%d", i);
+ snprintf (key, sizeof(key), "brick%d", i);
ret = dict_get_str (dict, key, &brick);
if (ret) {
gf_msg (this->name, GF_LOG_ERROR, errno,
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index 9a3353a1e50..e6efe11cf5c 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -13143,7 +13143,7 @@ glusterd_get_global_options_for_all_vols (rpcsvc_request_t *req, dict_t *ctx,
char *allvolopt = NULL;
int32_t i = 0;
gf_boolean_t exists = _gf_false;
- gf_boolean_t need_free;
+ gf_boolean_t need_free = _gf_false;
this = THIS;
GF_VALIDATE_OR_GOTO (THIS->name, this, out);
@@ -13203,7 +13203,6 @@ glusterd_get_global_options_for_all_vols (rpcsvc_request_t *req, dict_t *ctx,
/* If global option isn't set explicitly */
- need_free = _gf_false;
if (!def_val) {
if (!strcmp (allvolopt,
GLUSTERD_GLOBAL_OP_VERSION_KEY)) {