diff options
-rw-r--r-- | lib/tdb2/open.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/tdb2/open.c b/lib/tdb2/open.c index 63076ec77f..43a9a2b40e 100644 --- a/lib/tdb2/open.c +++ b/lib/tdb2/open.c @@ -550,10 +550,11 @@ struct tdb_context *tdb_open(const char *name, int tdb_flags, /* Clear any features we don't understand. */ if ((open_flags & O_ACCMODE) != O_RDONLY) { hdr.features_used &= TDB_FEATURE_MASK; - if (tdb_write_convert(tdb, offsetof(struct tdb_header, - features_used), - &hdr.features_used, - sizeof(hdr.features_used)) == -1) + ecode = tdb_write_convert(tdb, offsetof(struct tdb_header, + features_used), + &hdr.features_used, + sizeof(hdr.features_used)); + if (ecode != TDB_SUCCESS) goto fail; } |