From c2079947e59d7e37bfe33a166b6d01ae57eefce1 Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Wed, 3 Feb 2016 19:58:54 +0100 Subject: [PATCH] Remove a false positive warning for Coverity Scan It cannot see that if file is != 0 and handle->file == file, also handle->file is != 0. --- cmdline/handle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmdline/handle.c b/cmdline/handle.c index 1ebedf8f..4b3291b7 100644 --- a/cmdline/handle.c +++ b/cmdline/handle.c @@ -157,7 +157,7 @@ int handle_open(struct snapraid_handle* handle, struct snapraid_file* file, int out_missing = out; /* if already opened, nothing to do */ - if (handle->file == file && handle->f != -1) { + if (handle->file == file && handle->file != 0 && handle->f != -1) { return 0; }