]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs_gpfs: Fix return value if getting data fails
authorRikard Falkeborn <rikard.falkeborn@gmail.com>
Thu, 16 May 2019 19:29:52 +0000 (21:29 +0200)
committerJeremy Allison <jra@samba.org>
Sun, 19 May 2019 17:34:21 +0000 (17:34 +0000)
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 <rikard.falkeborn@gmail.com>
Reviewed-by: Ralph Böhme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/modules/vfs_gpfs.c

index 52c4e5ef25d748bfaea88eca3fa9a1e6991cdfa4..a1fe91d0df4131efe9640f6dae89175c6e1dc951 100644 (file)
@@ -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;