diff options
author | Ashish Pandey <aspandey@redhat.com> | 2018-10-10 13:46:22 +0530 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2018-10-11 05:09:47 +0000 |
commit | 46b970f64a797aa67b9cdb3704e24b8392398191 (patch) | |
tree | 45b87b805a65271a3d46a41f80a49e851800894f /xlators/cluster | |
parent | 27d3d481bd66c30aaa9e30040aadee7325e9995e (diff) | |
download | glusterfs-46b970f64a797aa67b9cdb3704e24b8392398191.tar.gz glusterfs-46b970f64a797aa67b9cdb3704e24b8392398191.tar.xz glusterfs-46b970f64a797aa67b9cdb3704e24b8392398191.zip |
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 <aspandey@redhat.com>
Diffstat (limited to 'xlators/cluster')
-rw-r--r-- | xlators/cluster/dht/src/dht-rename.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xlators/cluster/dht/src/dht-rename.c b/xlators/cluster/dht/src/dht-rename.c index ed4625c5f9..2e7c7b39a5 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); |