diff options
author | Stefan Metzmacher <metze@samba.org> | 2007-03-27 10:13:53 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:18:55 -0500 |
commit | 4d7c7bb68923aca232c3a6f59367af946e58d792 (patch) | |
tree | e3e73306118b13e5ae94dd101c7d2ee18939cea1 /source3/registry | |
parent | 3f370211a57676707e0869593ff3272b95830ee7 (diff) | |
download | samba-4d7c7bb68923aca232c3a6f59367af946e58d792.tar.gz samba-4d7c7bb68923aca232c3a6f59367af946e58d792.tar.xz 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)
Diffstat (limited to 'source3/registry')
-rw-r--r-- | source3/registry/reg_db.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source3/registry/reg_db.c b/source3/registry/reg_db.c index 6eedccfea58..3050c852dfe 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; } |