1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

s3:vfs:gpfs: remove a block and reduce indentation in gpfs_is_offline()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
This commit is contained in:
Michael Adam 2014-07-17 17:06:32 +02:00
parent d87d13f4c2
commit eb0577dca0

View File

@ -1801,6 +1801,7 @@ static bool vfs_gpfs_is_offline(struct vfs_handle_struct *handle,
char *path = NULL; char *path = NULL;
NTSTATUS status; NTSTATUS status;
struct gpfs_config_data *config; struct gpfs_config_data *config;
int ret;
SMB_VFS_HANDLE_GET_DATA(handle, config, SMB_VFS_HANDLE_GET_DATA(handle, config,
struct gpfs_config_data, struct gpfs_config_data,
@ -1816,15 +1817,12 @@ static bool vfs_gpfs_is_offline(struct vfs_handle_struct *handle,
return -1; return -1;
} }
{ ret = get_gpfs_winattrs(path, &attrs);
int ret; if (ret == -1) {
ret = get_gpfs_winattrs(path, &attrs); TALLOC_FREE(path);
return false;
if (ret == -1) {
TALLOC_FREE(path);
return false;
}
} }
if ((attrs.winAttrs & GPFS_WINATTR_OFFLINE) != 0) { if ((attrs.winAttrs & GPFS_WINATTR_OFFLINE) != 0) {
DEBUG(10, ("%s is offline\n", path)); DEBUG(10, ("%s is offline\n", path));
TALLOC_FREE(path); TALLOC_FREE(path);