summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2014-07-17 17:06:32 +0200
committerMichael Adam <obnox@samba.org>2014-07-24 11:56:10 +0200
commiteb0577dca04a2fde4691094a006954d417d1cf22 (patch)
tree6cbe4417ecdd14dbc309cc4f53b6555cb78d574c
parentd87d13f4c2a77c03bbffcd0fe4fc9464d9024cae (diff)
downloadsamba-eb0577dca04a2fde4691094a006954d417d1cf22.tar.gz
samba-eb0577dca04a2fde4691094a006954d417d1cf22.tar.xz
samba-eb0577dca04a2fde4691094a006954d417d1cf22.zip
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>
-rw-r--r--source3/modules/vfs_gpfs.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c
index 073060cf7c..e722a868a5 100644
--- a/source3/modules/vfs_gpfs.c
+++ b/source3/modules/vfs_gpfs.c
@@ -1801,6 +1801,7 @@ static bool vfs_gpfs_is_offline(struct vfs_handle_struct *handle,
char *path = NULL;
NTSTATUS status;
struct gpfs_config_data *config;
+ int ret;
SMB_VFS_HANDLE_GET_DATA(handle, config,
struct gpfs_config_data,
@@ -1816,15 +1817,12 @@ static bool vfs_gpfs_is_offline(struct vfs_handle_struct *handle,
return -1;
}
- {
- int ret;
- ret = get_gpfs_winattrs(path, &attrs);
-
- if (ret == -1) {
- TALLOC_FREE(path);
- return false;
- }
+ ret = get_gpfs_winattrs(path, &attrs);
+ if (ret == -1) {
+ TALLOC_FREE(path);
+ return false;
}
+
if ((attrs.winAttrs & GPFS_WINATTR_OFFLINE) != 0) {
DEBUG(10, ("%s is offline\n", path));
TALLOC_FREE(path);