From 664b170b13674c26c94ec1d3603570e707f8f1e5 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 10 Nov 2012 14:42:21 +0100 Subject: s3: Slightly simplify db_ctdb_marshall_loop_next Both callers give a key argument Reviewed-by: Michael Adam --- source3/lib/dbwrap/dbwrap_ctdb.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/source3/lib/dbwrap/dbwrap_ctdb.c b/source3/lib/dbwrap/dbwrap_ctdb.c index 8a0f806e50c..43b4b28d0db 100644 --- a/source3/lib/dbwrap/dbwrap_ctdb.c +++ b/source3/lib/dbwrap/dbwrap_ctdb.c @@ -339,10 +339,9 @@ static struct ctdb_rec_data *db_ctdb_marshall_loop_next(struct ctdb_marshall_buf *reqid = r->reqid; } - if (key != NULL) { - key->dptr = &r->data[0]; - key->dsize = r->keylen; - } + key->dptr = &r->data[0]; + key->dsize = r->keylen; + if (data != NULL) { data->dptr = &r->data[r->keylen]; data->dsize = r->datalen; -- cgit