summaryrefslogtreecommitdiffstats
path: root/source/registry
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-03-27 10:13:53 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:18:55 -0500
commit1a0599d7aadef651e4d5b88b59c95e8a118dfa5e (patch)
tree873c0c19f1ebc3a503c666014a98baa9bb10646f /source/registry
parent71c3880e8924c57dcd60573d628b8eb29cee6055 (diff)
downloadsamba-1a0599d7aadef651e4d5b88b59c95e8a118dfa5e.tar.gz
samba-1a0599d7aadef651e4d5b88b59c95e8a118dfa5e.tar.xz
samba-1a0599d7aadef651e4d5b88b59c95e8a118dfa5e.zip
r21978: make use of tdb_*_bystring()
to avoid creating the TDB_DATA struct from strings "by hand" metze
Diffstat (limited to 'source/registry')
-rw-r--r--source/registry/reg_db.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/source/registry/reg_db.c b/source/registry/reg_db.c
index 6eedccfea58..3050c852dfe 100644
--- a/source/registry/reg_db.c
+++ b/source/registry/reg_db.c
@@ -328,7 +328,7 @@ int regdb_close( void )
static BOOL regdb_store_keys_internal( const char *key, REGSUBKEY_CTR *ctr )
{
- TDB_DATA kbuf, dbuf;
+ TDB_DATA dbuf;
char *buffer;
int i = 0;
uint32 len, buflen;
@@ -373,11 +373,9 @@ static BOOL regdb_store_keys_internal( const char *key, REGSUBKEY_CTR *ctr )
/* finally write out the data */
- kbuf.dptr = keyname;
- kbuf.dsize = strlen(keyname)+1;
dbuf.dptr = buffer;
dbuf.dsize = len;
- if ( tdb_store( tdb_reg, kbuf, dbuf, TDB_REPLACE ) == -1) {
+ if ( tdb_store_bystring( tdb_reg, keyname, dbuf, TDB_REPLACE ) == -1) {
ret = False;
goto done;
}