From c1d83b0ff2bd400161a21c99b34523164ebd6462 Mon Sep 17 00:00:00 2001 From: Gregor Beck Date: Thu, 20 Oct 2011 10:18:24 +0200 Subject: [PATCH] s3:dbwrap_torture: code cleanup Signed-off-by: Michael Adam --- source3/utils/dbwrap_torture.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source3/utils/dbwrap_torture.c b/source3/utils/dbwrap_torture.c index c48f09afb58..3ce1f53b412 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)) { -- 2.11.4.GIT