r11721: Fix warnings
authorVolker Lendecke <vlendec@samba.org>
Mon, 14 Nov 2005 07:06:16 +0000 (07:06 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:46:17 +0000 (13:46 -0500)
(This used to be commit d760583e388157ff25e317da06c57e5a42f171bd)

source4/include/structs.h
source4/libcli/smb2/close.c
source4/libcli/smb2/getinfo.c
source4/libcli/smb2/read.c
source4/libcli/smb2/request.c
source4/libcli/smb2/write.c

index e519c52b5209629fbbb67823356904f5415284f4..4f97a6aadabe89119b5ddadff44cb3f76baed2e7 100644 (file)
@@ -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;
index d5a2c4d422fe57bb19b697da5a98644159077914..cf1cdbef5f7bc7dd2e17ddbd8a2b2e714cdc671c 100644 (file)
@@ -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);
 
index a7935526e5d82f44186979424f85f1066d3ab070..ffc2a92daf2b832455ab5fbfaa9f607e9feea945 100644 (file)
@@ -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);
 
index cbb3f74fa41505ff494a8e3981a0486047c028e9..0d63a6ba0a9f5f6dc8fecaa499a33e9689d96755 100644 (file)
@@ -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);
index a06121df051eaf91082ec318f32585649fef1ac0..4e40b1884a74368fd5caf3e5d219400bbff1fb94 100644 (file)
@@ -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]);
 }
 
index f842969b93fe1043048669f2225553f596cd8b44..e458a540e852141a66d25f224b861207be1cb863 100644 (file)
@@ -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);