diff options
author | Stefan Metzmacher <metze@samba.org> | 2014-01-30 16:07:10 +0100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2014-04-02 09:03:42 +0200 |
commit | 80dff80ee960c80e72c87c1f8e8deb7a2ae0b904 (patch) | |
tree | 1f91d2ca7840517ca40d6d0f36a9ed6b31194bd7 /lib/tdb | |
parent | b8f91696f5464e88acb7fabe8bd9dbe9c4b5bd79 (diff) | |
download | samba-80dff80ee960c80e72c87c1f8e8deb7a2ae0b904.tar.gz samba-80dff80ee960c80e72c87c1f8e8deb7a2ae0b904.tar.xz samba-80dff80ee960c80e72c87c1f8e8deb7a2ae0b904.zip |
tdb: don't alter errno on success of tdb_open_ex()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'lib/tdb')
-rw-r--r-- | lib/tdb/common/open.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/tdb/common/open.c b/lib/tdb/common/open.c index 0454c8bb50..789bc73d3d 100644 --- a/lib/tdb/common/open.c +++ b/lib/tdb/common/open.c @@ -170,6 +170,7 @@ _PUBLIC_ struct tdb_context *tdb_open_ex(const char *name, int hash_size, int td const struct tdb_logging_context *log_ctx, tdb_hash_func hash_fn) { + int orig_errno = errno; struct tdb_header header; struct tdb_context *tdb; struct stat st; @@ -489,6 +490,7 @@ _PUBLIC_ struct tdb_context *tdb_open_ex(const char *name, int hash_size, int td } tdb->next = tdbs; tdbs = tdb; + errno = orig_errno; return tdb; fail: |