From 78c4e657dc2e122b00f99912819357c85e35d54d Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Mon, 10 Apr 2017 11:02:41 +0200 Subject: 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 Reviewed-on: https://review.gluster.org/17026 NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Smoke: Gluster Build System Reviewed-by: Shyamsundar Ranganathan --- api/src/glfs-fops.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'api') 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); -- cgit