From 1946e917a6b768ee15250ce48b248d1e9a649138 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 29 Jun 2005 17:19:04 +0000 Subject: 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) --- source3/registry/reg_objects.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'source3/registry/reg_objects.c') 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; inum_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; } -- cgit