diff options
author | Gerald Carter <jerry@samba.org> | 2005-06-29 17:19:04 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:58:08 -0500 |
commit | 1946e917a6b768ee15250ce48b248d1e9a649138 (patch) | |
tree | cccc36074cee39b6db503a1b84ec3ccd692e73af | |
parent | 270b90e25f2ec5fcb1283588a9e605b7228e0e41 (diff) | |
download | samba-1946e917a6b768ee15250ce48b248d1e9a649138.tar.gz samba-1946e917a6b768ee15250ce48b248d1e9a649138.tar.bz2 samba-1946e917a6b768ee15250ce48b248d1e9a649138.zip |
r7997: Pointers don't kill people, people with pointers kill people...
"Honest office! It was a mistake! I thought the safety lock was on!"
* Fix problem setting registry values in in-memory objects
I now have printmig.exe successfully creating all of the printer
registry keys (in the tdb backend) which means that the top level
semantics are correct.
(This used to be commit 52899551070ddb8f185d53bd125ae06c192ef7b0)
-rw-r--r-- | source3/registry/reg_objects.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/source3/registry/reg_objects.c b/source3/registry/reg_objects.c index b3b47ae0e1..d6482e698b 100644 --- a/source3/registry/reg_objects.c +++ b/source3/registry/reg_objects.c @@ -378,10 +378,6 @@ int regval_ctr_delvalue( REGVAL_CTR *ctr, const char *name ) { int i; - /* search for the value */ - if (!(ctr->num_values)) - return 0; - for ( i=0; i<ctr->num_values; i++ ) { if ( strequal( ctr->values[i]->valuename, name ) ) break; @@ -395,7 +391,7 @@ int regval_ctr_delvalue( REGVAL_CTR *ctr, const char *name ) /* If 'i' was not the last element, just shift everything down one */ ctr->num_values--; if ( i < ctr->num_values ) - memmove( ctr->values[i], ctr->values[i+1], sizeof(REGISTRY_VALUE*)*(ctr->num_values-i) ); + memmove( &ctr->values[i], &ctr->values[i+1], sizeof(REGISTRY_VALUE*)*(ctr->num_values-i) ); return ctr->num_values; } |