1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

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>
This commit is contained in:
Volker Lendecke 2018-08-24 14:41:41 +02:00 committed by Ralph Boehme
parent 89f9c163f3
commit 46819e2628

View File

@ -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)) {