mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +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:
parent
89f9c163f3
commit
46819e2628
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user