From 33eefcec0ad2df3d6aac0ac225b64c61d42e56ef Mon Sep 17 00:00:00 2001 From: Iraj Jamali Date: Wed, 10 Oct 2018 12:29:21 +0530 Subject: mgmt/glusterd: clang fix Argument with 'nonnull' attribute passed null. Added checks to avoid the issues. Updates: bz#1622665 Change-Id: I0dba1185cee5baba3c124d687560a06fe182381e Signed-off-by: Iraj Jamali --- xlators/mgmt/glusterd/src/glusterd-geo-rep.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xlators') diff --git a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c index c8a4be2cdea..dedd243c2dd 100644 --- a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c +++ b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c @@ -4211,8 +4211,8 @@ glusterd_gsync_op_already_set(char *master, char *slave, char *conf_path, } if (is_bool) { - if (!strcmp(op_value, "true") || !strcmp(op_value, "1") || - !strcmp(op_value, "yes")) { + if (op_value && (!strcmp(op_value, "true") || !strcmp(op_value, "1") || + !strcmp(op_value, "yes"))) { op_val_cli = 1; } else { op_val_cli = 0; @@ -4223,7 +4223,7 @@ glusterd_gsync_op_already_set(char *master, char *slave, char *conf_path, goto out; } } else { - if (!strcmp(op_val_buf, op_value)) { + if (op_value && !strcmp(op_val_buf, op_value)) { ret = 0; goto out; } -- cgit