From 5196bfa6e633475a3f5b8d413e2d1e7c870b28f2 Mon Sep 17 00:00:00 2001 From: Poornima G Date: Mon, 19 Feb 2018 20:36:05 +0530 Subject: io-cache: Fix coverity issue Coverity issue : FORWARD_NULL fd is assigned within a condition, but the fd is used even outside the condition. Change-Id: I6548d605d8a8acc6a25f1657f9fb75586d513042 Signed-off-by: Poornima G --- xlators/performance/io-cache/src/io-cache.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'xlators') diff --git a/xlators/performance/io-cache/src/io-cache.c b/xlators/performance/io-cache/src/io-cache.c index 939d28f63e2..68191c56cf6 100644 --- a/xlators/performance/io-cache/src/io-cache.c +++ b/xlators/performance/io-cache/src/io-cache.c @@ -1411,10 +1411,8 @@ ioc_readdirp_cbk (call_frame_t *frame, void *cookie, xlator_t *this, char *path = NULL; fd_t *fd = NULL; - if (frame) { - fd = frame->local; - frame->local = NULL; - } + fd = frame->local; + frame->local = NULL; if (op_ret <= 0) goto unwind; -- cgit