diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-10-29 01:22:47 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:04:58 -0500 |
commit | ae3b7ef161fcf248f551a2f1ac9d1052f932b3a0 (patch) | |
tree | ec8f20c0ceb91d8c1a478e83aed75adf3a8c2ae8 /source4/ntvfs | |
parent | 7ce7137ad4edb03acf6189568d4c3c4f6d8798fe (diff) | |
download | samba-ae3b7ef161fcf248f551a2f1ac9d1052f932b3a0.tar.gz samba-ae3b7ef161fcf248f551a2f1ac9d1052f932b3a0.tar.bz2 samba-ae3b7ef161fcf248f551a2f1ac9d1052f932b3a0.zip |
r3349: fixed more uninitialised variable problems with the nbench module
(This used to be commit 915faf49350b29a46f39354cbac746455d70c92c)
Diffstat (limited to 'source4/ntvfs')
-rw-r--r-- | source4/ntvfs/nbench/vfs_nbench.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/source4/ntvfs/nbench/vfs_nbench.c b/source4/ntvfs/nbench/vfs_nbench.c index e542c3fb71..396d3a418e 100644 --- a/source4/ntvfs/nbench/vfs_nbench.c +++ b/source4/ntvfs/nbench/vfs_nbench.c @@ -286,6 +286,9 @@ static void nbench_open_send(struct smbsrv_request *req) switch (io->generic.level) { case RAW_OPEN_NTCREATEX: + if (!NT_STATUS_IS_OK(req->async_states->status)) { + ZERO_STRUCT(io->ntcreatex.out); + } nbench_log(req, "NTCreateX \"%s\" 0x%x 0x%x %d %s\n", io->ntcreatex.in.fname, io->ntcreatex.in.create_options, @@ -417,20 +420,17 @@ static NTSTATUS nbench_copy(struct ntvfs_module_context *ntvfs, static void nbench_read_send(struct smbsrv_request *req) { union smb_read *rd = req->async_states->private_data; - uint32_t nread; switch (rd->generic.level) { case RAW_READ_READX: - if (NT_STATUS_IS_OK(req->async_states->status)) { - nread = rd->readx.out.nread; - } else { - nread = 0; + if (!NT_STATUS_IS_OK(req->async_states->status)) { + ZERO_STRUCT(rd->readx.out); } nbench_log(req, "ReadX %d %d %d %d %s\n", rd->readx.in.fnum, (int)rd->readx.in.offset, rd->readx.in.maxcnt, - nread, + rd->readx.out.nread, get_nt_error_c_code(req->async_states->status)); break; default: @@ -461,6 +461,9 @@ static void nbench_write_send(struct smbsrv_request *req) switch (wr->generic.level) { case RAW_WRITE_WRITEX: + if (!NT_STATUS_IS_OK(req->async_states->status)) { + ZERO_STRUCT(wr->writex.out); + } nbench_log(req, "WriteX %d %d %d %d %s\n", wr->writex.in.fnum, (int)wr->writex.in.offset, @@ -470,6 +473,9 @@ static void nbench_write_send(struct smbsrv_request *req) break; case RAW_WRITE_WRITE: + if (!NT_STATUS_IS_OK(req->async_states->status)) { + ZERO_STRUCT(wr->write.out); + } nbench_log(req, "Write %d %d %d %d %s\n", wr->write.in.fnum, wr->write.in.offset, @@ -756,6 +762,9 @@ static void nbench_search_first_send(struct smbsrv_request *req) switch (io->generic.level) { case RAW_SEARCH_BOTH_DIRECTORY_INFO: + if (NT_STATUS_IS_ERR(req->async_states->status)) { + ZERO_STRUCT(io->t2ffirst.out); + } nbench_log(req, "FIND_FIRST \"%s\" %d %d %d %s\n", io->t2ffirst.in.pattern, io->generic.level, |