diff options
author | Volker Lendecke <vl@samba.org> | 2008-03-09 11:21:08 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-03-10 09:51:58 +0100 |
commit | 2e8d37534679cb80318281346091042cfc271fc9 (patch) | |
tree | 5fa9036586bf559706d95d24a11b5da6d82501a6 | |
parent | c2cd0e3c5498403086db85af44bffd20a02fcabc (diff) | |
download | samba-2e8d37534679cb80318281346091042cfc271fc9.tar.gz samba-2e8d37534679cb80318281346091042cfc271fc9.tar.bz2 samba-2e8d37534679cb80318281346091042cfc271fc9.zip |
Avoid some pointless checks
secrets_init() makes sure that the tdb is initialized
(This used to be commit 8725dbc8888cf7a1d3d9d1205678fcd3ca3c6350)
-rw-r--r-- | source3/passdb/secrets.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/source3/passdb/secrets.c b/source3/passdb/secrets.c index e4f1744bfd..d88c53897d 100644 --- a/source3/passdb/secrets.c +++ b/source3/passdb/secrets.c @@ -111,10 +111,6 @@ void *secrets_fetch(const char *key, size_t *size) return NULL; } - if (!tdb) { - return NULL; - } - dbuf = tdb_fetch(tdb, string_tdb_data(key)); if (size) { *size = dbuf.dsize; @@ -131,10 +127,6 @@ bool secrets_store(const char *key, const void *data, size_t size) return false; } - if (!tdb) { - return false; - } - return tdb_trans_store(tdb, string_tdb_data(key), make_tdb_data((const uint8 *)data, size), TDB_REPLACE) == 0; @@ -149,10 +141,6 @@ bool secrets_delete(const char *key) return false; } - if (!tdb) { - return false; - } - return tdb_trans_delete(tdb, string_tdb_data(key)) == 0; } |