glusterd: NULL pointer dereferencing clang fix

Added ternary operator to avoid NULL pointer dereferencing

Updates: bz#1622665

Change-Id: I4b970176b6b555c2eda1da2848c493e45b1e4217
Signed-off-by: Sheetal Pamecha <sheetal.pamecha08@gmail.com>
This commit is contained in:
Sheetal Pamecha 2018-09-10 11:01:38 +05:30 committed by Atin Mukherjee
parent 5384787d41
commit 3114c4a106

View File

@ -1677,7 +1677,8 @@ glusterd_update_slave_voluuid_slaveinfo (glusterd_volinfo_t *volinfo)
ret = 0;
out:
gf_msg_debug (this->name, 0, "Returning %d", ret);
gf_msg_debug ((this ? this->name : "glusterd"),
0, "Returning %d", ret);
return ret;
}