summaryrefslogtreecommitdiff
path: root/source3/lib/dbwrap
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-12-08 13:59:33 +0100
committerVolker Lendecke <vl@samba.org>2011-12-08 15:03:43 +0100
commitd9e5368fcccf02164c2bdc0fc679b71e7cfa510f (patch)
treed0f52fe3fc1ec508c6caea60e03840c5c3614773 /source3/lib/dbwrap
parent5cda77d5996acb26648fbb0231ddc8b20e626cc0 (diff)
downloadsamba-d9e5368fcccf02164c2bdc0fc679b71e7cfa510f.tar.gz
samba-d9e5368fcccf02164c2bdc0fc679b71e7cfa510f.tar.bz2
samba-d9e5368fcccf02164c2bdc0fc679b71e7cfa510f.zip
s3-dbwrap: Avoid an "else" by an early return
Diffstat (limited to 'source3/lib/dbwrap')
-rw-r--r--source3/lib/dbwrap/dbwrap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/lib/dbwrap/dbwrap.c b/source3/lib/dbwrap/dbwrap.c
index 44344b9675..587fc8a481 100644
--- a/source3/lib/dbwrap/dbwrap.c
+++ b/source3/lib/dbwrap/dbwrap.c
@@ -231,11 +231,11 @@ int dbwrap_parse_record(struct db_context *db, TDB_DATA key,
parser = dbwrap_null_parser;
}
- if (db->parse_record) {
- return db->parse_record(db, key, parser, private_data);
- } else {
- return dbwrap_fallback_parse_record(db, key, parser, private_data);
+ if (db->parse_record == NULL) {
+ return dbwrap_fallback_parse_record(db, key, parser,
+ private_data);
}
+ return db->parse_record(db, key, parser, private_data);
}
int dbwrap_wipe(struct db_context *db)