1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-29 13:49:30 +03:00

Avoid some pointless checks

secrets_init() makes sure that the tdb is initialized
(This used to be commit 8725dbc888)
This commit is contained in:
Volker Lendecke
2008-03-09 11:21:08 +01:00
parent c2cd0e3c54
commit 2e8d375346

View File

@ -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;
}