summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/modules/timestamps.c
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2005-01-12 16:00:01 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:08:47 -0500
commita2f77f979d7271a9708ed06f43b00ffb10ec7f4c (patch)
treef9de8a02597f95ba9c7af1c2086a69cafacb3a87 /source4/lib/ldb/modules/timestamps.c
parent7588b41e153ebd84c974f7289847bcd05f32ba4b (diff)
downloadsamba-a2f77f979d7271a9708ed06f43b00ffb10ec7f4c.tar.gz
samba-a2f77f979d7271a9708ed06f43b00ffb10ec7f4c.tar.bz2
samba-a2f77f979d7271a9708ed06f43b00ffb10ec7f4c.zip
r4714: move the ldb code to the new talloc interface (eg remove _p suffix)
this helps standalone building of ldb renew the schema module split code into functions to improve readability and code reuse add and modify works correctly but we need a proper testsuite Simo (This used to be commit a681ae365ff1b5a2771b42ebd90336651ce1e513)
Diffstat (limited to 'source4/lib/ldb/modules/timestamps.c')
-rw-r--r--source4/lib/ldb/modules/timestamps.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source4/lib/ldb/modules/timestamps.c b/source4/lib/ldb/modules/timestamps.c
index 09679435f5..4066d231cd 100644
--- a/source4/lib/ldb/modules/timestamps.c
+++ b/source4/lib/ldb/modules/timestamps.c
@@ -74,11 +74,11 @@ static int add_time_element(struct ldb_module *module, struct ldb_message *msg,
}
}
- msg->elements = talloc_realloc_p(msg, msg->elements,
+ msg->elements = talloc_realloc(msg, msg->elements,
struct ldb_message_element, msg->num_elements + 1);
name = talloc_strdup(msg->elements, attr_name);
timestr = talloc_strdup(msg->elements, time_string);
- values = talloc_p(msg->elements, struct ldb_val);
+ values = talloc(msg->elements, struct ldb_val);
if (!msg->elements || !name || !timestr || !values) {
return -1;
}
@@ -113,7 +113,7 @@ static int timestamps_add_record(struct ldb_module *module, const struct ldb_mes
return -1;
}
- msg2 = talloc_p(module, struct ldb_message);
+ msg2 = talloc(module, struct ldb_message);
if (!msg2) {
return -1;
}
@@ -130,7 +130,7 @@ static int timestamps_add_record(struct ldb_module *module, const struct ldb_mes
msg2->dn = msg->dn;
msg2->num_elements = msg->num_elements;
msg2->private_data = msg->private_data;
- msg2->elements = talloc_array_p(msg2, struct ldb_message_element, msg2->num_elements);
+ msg2->elements = talloc_array(msg2, struct ldb_message_element, msg2->num_elements);
for (i = 0; i < msg2->num_elements; i++) {
msg2->elements[i] = msg->elements[i];
}
@@ -169,7 +169,7 @@ static int timestamps_modify_record(struct ldb_module *module, const struct ldb_
return -1;
}
- msg2 = talloc_p(module, struct ldb_message);
+ msg2 = talloc(module, struct ldb_message);
if (!msg2) {
return -1;
}
@@ -187,7 +187,7 @@ static int timestamps_modify_record(struct ldb_module *module, const struct ldb_
msg2->dn = msg->dn;
msg2->num_elements = msg->num_elements;
msg2->private_data = msg->private_data;
- msg2->elements = talloc_array_p(msg2, struct ldb_message_element, msg2->num_elements);
+ msg2->elements = talloc_array(msg2, struct ldb_message_element, msg2->num_elements);
for (i = 0; i < msg2->num_elements; i++) {
msg2->elements[i] = msg->elements[i];
}
@@ -272,11 +272,11 @@ struct ldb_module *timestamps_module_init(struct ldb_context *ldb, const char *o
struct ldb_module *ctx;
struct private_data *data;
- ctx = talloc_p(ldb, struct ldb_module);
+ ctx = talloc(ldb, struct ldb_module);
if (!ctx)
return NULL;
- data = talloc_p(ctx, struct private_data);
+ data = talloc(ctx, struct private_data);
if (!data) {
talloc_free(ctx);
return NULL;