From 3a4f23636d60799a3d3b80d395ef7af710195919 Mon Sep 17 00:00:00 2001 From: Rikard Falkeborn Date: Thu, 16 May 2019 21:29:52 +0200 Subject: [PATCH] vfs_gpfs: Fix return value if getting data fails MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Returning -1 in a function with bool as return value type is the same as returning true. Change to false to indicate the error. Detected by the help of cppcheck. Signed-off-by: Rikard Falkeborn Reviewed-by: Ralph Böhme Reviewed-by: Jeremy Allison --- source3/modules/vfs_gpfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index 52c4e5ef25d..a1fe91d0df4 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -1995,7 +1995,7 @@ static bool vfs_gpfs_is_offline(struct vfs_handle_struct *handle, SMB_VFS_HANDLE_GET_DATA(handle, config, struct gpfs_config_data, - return -1); + return false); if (!config->winattr) { return false; -- 2.47.3