summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2018-08-24 14:41:41 +0200
committerRalph Boehme <slow@samba.org>2018-09-03 18:44:24 +0200
commit46819e2628a1439a94ed3a63bc164ce1d7b67706 (patch)
treea6b91bd4adbfd58fd1230b7599ad2d7a3a45f67d /source3
parent89f9c163f32a409a40ae73455af892e58cd0e214 (diff)
downloadsamba-46819e2628a1439a94ed3a63bc164ce1d7b67706.tar.gz
dbwrap_tool: Simplify listkey_fn
To me dbwrap_record_get_key(rec).dsize just looks a bit ugly Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/utils/dbwrap_tool.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/utils/dbwrap_tool.c b/source3/utils/dbwrap_tool.c
index 3ba0c52bb4c..ee08c2dc4b6 100644
--- a/source3/utils/dbwrap_tool.c
+++ b/source3/utils/dbwrap_tool.c
@@ -302,8 +302,9 @@ static int dbwrap_tool_erase(struct db_context *db,
static int listkey_fn(struct db_record *rec, void *private_data)
{
- int length = dbwrap_record_get_key(rec).dsize;
- unsigned char *p = (unsigned char *)dbwrap_record_get_key(rec).dptr;
+ TDB_DATA key = dbwrap_record_get_key(rec);
+ size_t length = key.dsize;
+ unsigned char *p = (unsigned char *)key.dptr;
while (length--) {
if (isprint(*p) && !strchr("\"\\", *p)) {