From c9bc1e492404077c6b40b5cefe33e859503a4227 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Thu, 6 Oct 2011 21:24:07 +0200 Subject: s3:dbwrap: change dbwrap_store_int32() to NTSTATUS return type for consistency and better error propagation --- source3/passdb/pdb_tdb.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'source3/passdb') diff --git a/source3/passdb/pdb_tdb.c b/source3/passdb/pdb_tdb.c index 80a4b49f9d..f16d99d0f4 100644 --- a/source3/passdb/pdb_tdb.c +++ b/source3/passdb/pdb_tdb.c @@ -389,15 +389,19 @@ static bool tdbsam_convert(struct db_context **pp_db, const char *name, int32 fr goto cancel; } - if (dbwrap_store_int32(db, TDBSAM_VERSION_STRING, - TDBSAM_VERSION) != 0) { - DEBUG(0, ("tdbsam_convert: Could not store tdbsam version\n")); + status = dbwrap_store_int32(db, TDBSAM_VERSION_STRING, + TDBSAM_VERSION); + if (!NT_STATUS_IS_OK(status)) { + DEBUG(0, ("tdbsam_convert: Could not store tdbsam version: " + "%s\n", nt_errstr(status))); goto cancel; } - if (dbwrap_store_int32(db, TDBSAM_MINOR_VERSION_STRING, - TDBSAM_MINOR_VERSION) != 0) { - DEBUG(0, ("tdbsam_convert: Could not store tdbsam minor version\n")); + status = dbwrap_store_int32(db, TDBSAM_MINOR_VERSION_STRING, + TDBSAM_MINOR_VERSION); + if (!NT_STATUS_IS_OK(status)) { + DEBUG(0, ("tdbsam_convert: Could not store tdbsam minor " + "version: %s\n", nt_errstr(status))); goto cancel; } -- cgit