mirror of
https://github.com/samba-team/samba.git
synced 2025-08-24 21:49:29 +03:00
r11721: Fix warnings
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
7c229e5b9f
commit
d760583e38
@ -344,3 +344,8 @@ struct smb2_tree_connect;
|
||||
struct smb2_create;
|
||||
struct smb2_close;
|
||||
struct smb2_getinfo;
|
||||
struct smb2_read;
|
||||
struct smb2_write;
|
||||
struct smb2_handle;
|
||||
|
||||
union smb2_fileinfo;
|
||||
|
@ -38,7 +38,7 @@ struct smb2_request *smb2_close_send(struct smb2_tree *tree, struct smb2_close *
|
||||
SSVAL(req->out.body, 0x00, io->in.buffer_code);
|
||||
SSVAL(req->out.body, 0x02, io->in.flags);
|
||||
SIVAL(req->out.body, 0x04, io->in._pad);
|
||||
smb2_put_handle(req->out.body+0x08, io->in.handle);
|
||||
smb2_put_handle(req->out.body+0x08, &io->in.handle);
|
||||
|
||||
smb2_transport_send(req);
|
||||
|
||||
|
@ -42,7 +42,7 @@ struct smb2_request *smb2_getinfo_send(struct smb2_tree *tree, struct smb2_getin
|
||||
SIVAL(req->out.body, 0x0C, io->in.flags);
|
||||
SIVAL(req->out.body, 0x10, io->in.unknown3);
|
||||
SIVAL(req->out.body, 0x14, io->in.unknown4);
|
||||
smb2_put_handle(req->out.body+0x18, io->in.handle);
|
||||
smb2_put_handle(req->out.body+0x18, &io->in.handle);
|
||||
|
||||
smb2_transport_send(req);
|
||||
|
||||
|
@ -39,7 +39,7 @@ struct smb2_request *smb2_read_send(struct smb2_tree *tree, struct smb2_read *io
|
||||
SSVAL(req->out.body, 0x02, 0);
|
||||
SIVAL(req->out.body, 0x04, io->in.length);
|
||||
SBVAL(req->out.body, 0x08, io->in.offset);
|
||||
smb2_put_handle(req->out.body+0x10, io->in.handle);
|
||||
smb2_put_handle(req->out.body+0x10, &io->in.handle);
|
||||
memcpy(req->out.body+0x20, io->in._pad, 17);
|
||||
|
||||
smb2_transport_send(req);
|
||||
|
@ -267,9 +267,9 @@ NTSTATUS smb2_string_blob(TALLOC_CTX *mem_ctx, const char *str, DATA_BLOB *blob)
|
||||
/*
|
||||
put a file handle into a buffer
|
||||
*/
|
||||
void smb2_put_handle(uint8_t *data, struct smb2_handle h)
|
||||
void smb2_put_handle(uint8_t *data, struct smb2_handle *h)
|
||||
{
|
||||
SBVAL(data, 0, h.data[0]);
|
||||
SBVAL(data, 8, h.data[1]);
|
||||
SBVAL(data, 0, h->data[0]);
|
||||
SBVAL(data, 8, h->data[1]);
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@ struct smb2_request *smb2_write_send(struct smb2_tree *tree, struct smb2_write *
|
||||
SSVAL(req->out.body, 0x02, req->out.body+0x30 - req->out.hdr);
|
||||
SIVAL(req->out.body, 0x04, io->in.data.length);
|
||||
SBVAL(req->out.body, 0x08, io->in.offset);
|
||||
smb2_put_handle(req->out.body+0x10, io->in.handle);
|
||||
smb2_put_handle(req->out.body+0x10, &io->in.handle);
|
||||
memcpy(req->out.body+0x20, io->in._pad, 0x10);
|
||||
memcpy(req->out.body+0x30, io->in.data.data, io->in.data.length);
|
||||
|
||||
|
Reference in New Issue
Block a user