diff options
author | Niels de Vos <ndevos@redhat.com> | 2017-04-10 11:02:41 +0200 |
---|---|---|
committer | Shyamsundar Ranganathan <srangana@redhat.com> | 2017-04-11 09:39:57 -0400 |
commit | 78c4e657dc2e122b00f99912819357c85e35d54d (patch) | |
tree | 7e1f5bb9ab4a2841d3be1f8371f17262f092085d /api | |
parent | 594a7c6a187cf780bd666e7343c39a2d92fc67ef (diff) |
gfapi: remove unneeded NULL-check in glfs_fsync_async_common()
Coverity reported that "glfd" has a NULL-check at the end of the
function, but is used without checking earlier. Because "glfd" is passed
as parameter to the (internal) function, there is no need to have the
additional NULL-check.
Change-Id: I1390b2ef250fbf624f0bc2b0eda7b7588942aae9
BUG: 789278
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: https://review.gluster.org/17026
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Diffstat (limited to 'api')
-rw-r--r-- | api/src/glfs-fops.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/api/src/glfs-fops.c b/api/src/glfs-fops.c index ea61c8b7a43..ca2d3adc14f 100644 --- a/api/src/glfs-fops.c +++ b/api/src/glfs-fops.c @@ -1440,8 +1440,7 @@ out: if (ret) { if (fd) fd_unref (fd); - if (glfd) - GF_REF_PUT (glfd); + GF_REF_PUT (glfd); GF_FREE (gio); if (frame) STACK_DESTROY (frame->root); |