summaryrefslogtreecommitdiff
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
commit4d7c7bb68923aca232c3a6f59367af946e58d792 (patch)
treee3e73306118b13e5ae94dd101c7d2ee18939cea1
parent3f370211a57676707e0869593ff3272b95830ee7 (diff)
downloadsamba-4d7c7bb68923aca232c3a6f59367af946e58d792.tar.gz
samba-4d7c7bb68923aca232c3a6f59367af946e58d792.tar.bz2
samba-4d7c7bb68923aca232c3a6f59367af946e58d792.zip
r21978: make use of tdb_*_bystring()
to avoid creating the TDB_DATA struct from strings "by hand" metze (This used to be commit 1a0599d7aadef651e4d5b88b59c95e8a118dfa5e)
-rw-r--r--source3/registry/reg_db.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/source3/registry/reg_db.c b/source3/registry/reg_db.c
index 6eedccfea5..3050c852df 100644
--- a/source3/registry/reg_db.c
+++ b/source3/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;
}