From 46b970f64a797aa67b9cdb3704e24b8392398191 Mon Sep 17 00:00:00 2001 From: Ashish Pandey Date: Wed, 10 Oct 2018 13:46:22 +0530 Subject: cluster/dht : Fix coverity issue To check if the gfid is null or not we should use function gf_uuid_is_null CID: 1382364 https://scan6.coverity.com/reports.htm#v42607/p10714/fileInstanceId=86243257&defectInstanceId=26374360&mergedDefectId=1382364 Change-Id: I81944b823c9ee6e6dcc9695f64f7e5966e0d7030 updates: bz#789278 Signed-off-by: Ashish Pandey --- xlators/cluster/dht/src/dht-rename.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xlators') diff --git a/xlators/cluster/dht/src/dht-rename.c b/xlators/cluster/dht/src/dht-rename.c index ed4625c5f94..2e7c7b39a5f 100644 --- a/xlators/cluster/dht/src/dht-rename.c +++ b/xlators/cluster/dht/src/dht-rename.c @@ -491,14 +491,14 @@ dht_order_rename_lock(call_frame_t *frame, loc_t **loc, xlator_t **subvol) if (ret == 0) { /* hashed subvols are the same for src and dst */ /* Entrylks need to be ordered*/ - if (local->loc.pargfid) + if (!gf_uuid_is_null(local->loc.pargfid)) uuid_utoa_r(local->loc.pargfid, src); else if (local->loc.parent) uuid_utoa_r(local->loc.parent->gfid, src); strcat(src, local->loc.name); - if (local->loc2.pargfid) + if (!gf_uuid_is_null(local->loc2.pargfid)) uuid_utoa_r(local->loc2.pargfid, dst); else if (local->loc2.parent) uuid_utoa_r(local->loc2.parent->gfid, dst); -- cgit