diff options
author | Michael Adam <obnox@samba.org> | 2011-11-29 15:57:10 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2011-11-29 18:20:06 +0100 |
commit | 819ca3b697e1b396b83308341cf81c19362c2626 (patch) | |
tree | 199b845a75b4ef1817831d053e53c293e1a91c6d /source3/lib/dbwrap | |
parent | bba62cdb0c5f3ae85a5eeaa9b747e04a2d392440 (diff) | |
download | samba-819ca3b697e1b396b83308341cf81c19362c2626.tar.gz samba-819ca3b697e1b396b83308341cf81c19362c2626.tar.bz2 samba-819ca3b697e1b396b83308341cf81c19362c2626.zip |
s3:dbwrap_ctdb: re-use map_nt_error_from_tdb() in local tdb_error_to_ntstatus()
Diffstat (limited to 'source3/lib/dbwrap')
-rw-r--r-- | source3/lib/dbwrap/dbwrap_ctdb.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/source3/lib/dbwrap/dbwrap_ctdb.c b/source3/lib/dbwrap/dbwrap_ctdb.c index aae5c065f6..234aeebae3 100644 --- a/source3/lib/dbwrap/dbwrap_ctdb.c +++ b/source3/lib/dbwrap/dbwrap_ctdb.c @@ -82,22 +82,9 @@ struct db_ctdb_rec { static NTSTATUS tdb_error_to_ntstatus(struct tdb_context *tdb) { - NTSTATUS status; enum TDB_ERROR tret = tdb_error(tdb); - switch (tret) { - case TDB_ERR_EXISTS: - status = NT_STATUS_OBJECT_NAME_COLLISION; - break; - case TDB_ERR_NOEXIST: - status = NT_STATUS_OBJECT_NAME_NOT_FOUND; - break; - default: - status = NT_STATUS_INTERNAL_DB_CORRUPTION; - break; - } - - return status; + return map_nt_error_from_tdb(tret); } |