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

tdb2: tdb_parse_record() returns negative errors, not -1.

Fixup callers to tdb_parse_record() to be compatible with tdb2.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2011-06-20 18:40:32 +09:30
parent 42506c4a3e
commit 9eaaf1fc67
2 changed files with 3 additions and 3 deletions

View File

@ -183,7 +183,7 @@ static int db_tdb_parse(struct db_context *db, TDB_DATA key,
struct db_tdb_ctx *ctx = talloc_get_type_abort(
db->private_data, struct db_tdb_ctx);
return tdb_parse_record(ctx->wtdb->tdb, key, parser, private_data);
return tdb_parse_record(ctx->wtdb->tdb, key, parser, private_data) ? -1 : 0;
}
static NTSTATUS db_tdb_store(struct db_record *rec, TDB_DATA data, int flag)

View File

@ -344,11 +344,11 @@ bool gencache_parse(const char *keystr,
state.private_data = private_data;
ret = tdb_parse_record(cache_notrans, key, gencache_parse_fn, &state);
if (ret != -1) {
if (ret == 0) {
return true;
}
ret = tdb_parse_record(cache, key, gencache_parse_fn, &state);
return (ret != -1);
return (ret == 0);
}
struct gencache_get_data_blob_state {