summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Beck <gbeck@sernet.de>2011-10-20 10:18:24 +0200
committerMichael Adam <obnox@samba.org>2011-11-29 18:20:06 +0100
commitc1d83b0ff2bd400161a21c99b34523164ebd6462 (patch)
tree11b648ba63cdfa04cc16a9b23da93d81efd3db5f
parent6b5cfa39f252c7272f3cef0a00d6a5d01db81024 (diff)
downloadsamba-c1d83b0ff2bd400161a21c99b34523164ebd6462.tar.gz
samba-c1d83b0ff2bd400161a21c99b34523164ebd6462.tar.bz2
samba-c1d83b0ff2bd400161a21c99b34523164ebd6462.zip
s3:dbwrap_torture: code cleanup
Signed-off-by: Michael Adam <obnox@samba.org>
-rw-r--r--source3/utils/dbwrap_torture.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/utils/dbwrap_torture.c b/source3/utils/dbwrap_torture.c
index c48f09afb5..3ce1f53b41 100644
--- a/source3/utils/dbwrap_torture.c
+++ b/source3/utils/dbwrap_torture.c
@@ -25,6 +25,7 @@
#include "dbwrap/dbwrap.h"
#include "dbwrap/dbwrap_open.h"
#include "messages.h"
+#include "lib/util/util_tdb.h"
#if 0
#include "lib/events/events.h"
@@ -42,7 +43,7 @@ static int timelimit = 10;
static int torture_delay = 0;
static int verbose = 0;
static int no_trans = 0;
-static char *db_name = (char *)discard_const(DEFAULT_DB_NAME);
+static const char *db_name = DEFAULT_DB_NAME;
static unsigned int pnn;
@@ -129,8 +130,7 @@ static void test_store_records(struct db_context *db, struct tevent_context *ev)
TALLOC_CTX *tmp_ctx = talloc_stackframe();
struct timeval start;
- key.dptr = (unsigned char *)discard_const("testkey");
- key.dsize = strlen((const char *)key.dptr)+1;
+ key = string_term_tdb_data("testkey");
start = timeval_current();
while ((timelimit == 0) || (timeval_elapsed(&start) < timelimit)) {