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 | 8725dbc8888cf7a1d3d9d1205678fcd3ca3c6350 (patch) | |
tree | f94d444fb00a215832148a2931192b71e142fcf3 /source/passdb | |
parent | 27065382d9b692b5885265c9d60ffb7ec7748c38 (diff) | |
download | samba-8725dbc8888cf7a1d3d9d1205678fcd3ca3c6350.tar.gz samba-8725dbc8888cf7a1d3d9d1205678fcd3ca3c6350.tar.xz samba-8725dbc8888cf7a1d3d9d1205678fcd3ca3c6350.zip |
Avoid some pointless checks
secrets_init() makes sure that the tdb is initialized
Diffstat (limited to 'source/passdb')
-rw-r--r-- | source/passdb/secrets.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/source/passdb/secrets.c b/source/passdb/secrets.c index e4f1744bfdf..d88c53897d0 100644 --- a/source/passdb/secrets.c +++ b/source/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; } |