summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2013-12-04 14:01:57 +0100
committerMichael Adam <obnox@samba.org>2013-12-06 01:14:09 +0100
commit143907025b19ced780e7b1a3455de80d96eb0432 (patch)
tree0b2842154f228d9ca620a9093843485cd8ae3a2f
parent1d7b909bd2fec8b0c2f7056b61d9ca5d6776ed7d (diff)
downloadsamba-143907025b19ced780e7b1a3455de80d96eb0432.tar.gz
samba-143907025b19ced780e7b1a3455de80d96eb0432.tar.xz
samba-143907025b19ced780e7b1a3455de80d96eb0432.zip
s3-torture: Make sure status is used initialized.
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
-rw-r--r--source3/torture/cmd_vfs.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source3/torture/cmd_vfs.c b/source3/torture/cmd_vfs.c
index f923ed5999a..1ccdfe33f9d 100644
--- a/source3/torture/cmd_vfs.c
+++ b/source3/torture/cmd_vfs.c
@@ -1489,6 +1489,7 @@ static NTSTATUS cmd_set_nt_acl(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int a
return NT_STATUS_UNSUCCESSFUL;
}
+ status = NT_STATUS_OK;
ret = SMB_VFS_FSTAT(fsp, &smb_fname->st);
if (ret == -1) {
/* If we have an fd, this stat should succeed. */
@@ -1545,7 +1546,6 @@ static NTSTATUS cmd_sys_acl_get_fd(struct vfs_state *vfs, TALLOC_CTX *mem_ctx,
int argc, const char **argv)
{
int fd;
- NTSTATUS status;
SMB_ACL_T acl;
char *acl_text;
@@ -1567,7 +1567,7 @@ static NTSTATUS cmd_sys_acl_get_fd(struct vfs_state *vfs, TALLOC_CTX *mem_ctx,
acl = SMB_VFS_SYS_ACL_GET_FD(vfs->files[fd], talloc_tos());
if (!acl) {
printf("sys_acl_get_fd failed (%s)\n", strerror(errno));
- return status;
+ return NT_STATUS_UNSUCCESSFUL;
}
acl_text = sys_acl_to_text(acl, NULL);
printf("%s", acl_text);
@@ -1579,7 +1579,6 @@ static NTSTATUS cmd_sys_acl_get_fd(struct vfs_state *vfs, TALLOC_CTX *mem_ctx,
static NTSTATUS cmd_sys_acl_get_file(struct vfs_state *vfs, TALLOC_CTX *mem_ctx,
int argc, const char **argv)
{
- NTSTATUS status;
SMB_ACL_T acl;
char *acl_text;
int type;
@@ -1592,7 +1591,7 @@ static NTSTATUS cmd_sys_acl_get_file(struct vfs_state *vfs, TALLOC_CTX *mem_ctx,
acl = SMB_VFS_SYS_ACL_GET_FILE(vfs->conn, argv[1], type, talloc_tos());
if (!acl) {
printf("sys_acl_get_file failed (%s)\n", strerror(errno));
- return status;
+ return NT_STATUS_UNSUCCESSFUL;
}
acl_text = sys_acl_to_text(acl, NULL);
printf("%s", acl_text);