summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-12-03 07:20:30 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:06:20 -0500
commit6e6374cb5bcffb4df8bdb0a83327fff92b61ac84 (patch)
treefa45bc8c1a7281492f39069e5edd86da6d0c5d4e /source4/torture
parente5ce904ddbd6175ba86ed827bf096b76b11b5511 (diff)
downloadsamba-6e6374cb5bcffb4df8bdb0a83327fff92b61ac84.tar.gz
samba-6e6374cb5bcffb4df8bdb0a83327fff92b61ac84.tar.bz2
samba-6e6374cb5bcffb4df8bdb0a83327fff92b61ac84.zip
r4055: fixed more places to use type safe allocation macros
(This used to be commit eec698254f67365f27b4b7569fa982e22472aca1)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/basic/aliases.c4
-rw-r--r--source4/torture/nbench/nbio.c2
-rw-r--r--source4/torture/raw/mkdir.c2
-rw-r--r--source4/torture/raw/open.c2
4 files changed, 5 insertions, 5 deletions
diff --git a/source4/torture/basic/aliases.c b/source4/torture/basic/aliases.c
index ba4bf69f13..50aabb825a 100644
--- a/source4/torture/basic/aliases.c
+++ b/source4/torture/basic/aliases.c
@@ -48,7 +48,7 @@ static void gen_aliases(struct smbcli_state *cli, struct smb_trans2 *t2, int lev
status = smb_raw_trans2(cli->tree, mem_ctx, t2);
if (!NT_STATUS_IS_OK(status)) continue;
- t2b = talloc(mem_ctx, sizeof(*t2b));
+ t2b = talloc_p(mem_ctx, struct trans2_blobs);
t2b->level = level;
t2b->params = t2->out.params;
t2b->data = t2->out.data;
@@ -278,7 +278,7 @@ static void gen_set_aliases(struct smbcli_state *cli, struct smb_trans2 *t2, int
if (!NT_STATUS_IS_OK(status) &&
!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_PARAMETER)) continue;
- t2b = talloc(mem_ctx, sizeof(*t2b));
+ t2b = talloc_p(mem_ctx, struct trans2_blobs);
t2b->level = level;
t2b->params = t2->out.params;
t2b->data = t2->out.data;
diff --git a/source4/torture/nbench/nbio.c b/source4/torture/nbench/nbio.c
index 34de81c5b3..32bd108442 100644
--- a/source4/torture/nbench/nbio.c
+++ b/source4/torture/nbench/nbio.c
@@ -281,7 +281,7 @@ void nb_createx(const char *fname,
if (!NT_STATUS_IS_OK(ret)) return;
- f = malloc(sizeof(struct ftable));
+ f = malloc_p(struct ftable);
f->handle = handle;
f->fd = io.ntcreatex.out.fnum;
diff --git a/source4/torture/raw/mkdir.c b/source4/torture/raw/mkdir.c
index 2d7fa678e1..539258946a 100644
--- a/source4/torture/raw/mkdir.c
+++ b/source4/torture/raw/mkdir.c
@@ -101,7 +101,7 @@ static BOOL test_mkdir(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
/* with EAs */
md.t2mkdir.in.num_eas = 1;
- md.t2mkdir.in.eas = talloc(mem_ctx, sizeof(md.t2mkdir.in.eas[0]));
+ md.t2mkdir.in.eas = talloc_p(mem_ctx, struct ea_struct);
md.t2mkdir.in.eas[0].flags = 0;
md.t2mkdir.in.eas[0].name.s = "EAONE";
md.t2mkdir.in.eas[0].value = data_blob_talloc(mem_ctx, "1", 1);
diff --git a/source4/torture/raw/open.c b/source4/torture/raw/open.c
index fb50ec6c4f..fe0d4fe4fa 100644
--- a/source4/torture/raw/open.c
+++ b/source4/torture/raw/open.c
@@ -499,7 +499,7 @@ static BOOL test_t2open(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.t2open.in.size = 0;
io.t2open.in.timeout = 0;
- io.t2open.in.eas = talloc(mem_ctx, sizeof(io.t2open.in.eas[0]));
+ io.t2open.in.eas = talloc_p(mem_ctx, struct ea_struct);
io.t2open.in.num_eas = 1;
io.t2open.in.eas[0].flags = 0;
io.t2open.in.eas[0].name.s = "EAONE";