diff options
author | Gerald Carter <jerry@samba.org> | 2005-06-29 17:19:04 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2005-06-29 17:19:04 +0000 |
commit | 443555ee7d587fc88a9b0923e3aaecc9407f2672 (patch) | |
tree | 8b389b4cc19c047abff562173c006dc8d804a5aa | |
parent | c199b7f290a601d2aec40445f862a90690a4da07 (diff) | |
download | samba-443555ee7d587fc88a9b0923e3aaecc9407f2672.tar.gz samba-443555ee7d587fc88a9b0923e3aaecc9407f2672.tar.xz samba-443555ee7d587fc88a9b0923e3aaecc9407f2672.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.
-rw-r--r-- | source/registry/reg_objects.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/source/registry/reg_objects.c b/source/registry/reg_objects.c index b3b47ae0e14..d6482e698b0 100644 --- a/source/registry/reg_objects.c +++ b/source/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; } |