svn commit: samba r7997 - branches/SAMBA_3_0/source/registry
trunk/source/registry
jerry at samba.org
jerry at samba.org
Wed Jun 29 17:19:04 GMT 2005
Author: jerry
Date: 2005-06-29 17:19:04 +0000 (Wed, 29 Jun 2005)
New Revision: 7997
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7997
Log:
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.
Modified:
branches/SAMBA_3_0/source/registry/reg_objects.c
trunk/source/registry/reg_objects.c
Changeset:
Modified: branches/SAMBA_3_0/source/registry/reg_objects.c
===================================================================
--- branches/SAMBA_3_0/source/registry/reg_objects.c 2005-06-29 16:36:56 UTC (rev 7996)
+++ branches/SAMBA_3_0/source/registry/reg_objects.c 2005-06-29 17:19:04 UTC (rev 7997)
@@ -378,10 +378,6 @@
{
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 @@
/* 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;
}
Modified: trunk/source/registry/reg_objects.c
===================================================================
--- trunk/source/registry/reg_objects.c 2005-06-29 16:36:56 UTC (rev 7996)
+++ trunk/source/registry/reg_objects.c 2005-06-29 17:19:04 UTC (rev 7997)
@@ -378,10 +378,6 @@
{
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 @@
/* 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;
}
More information about the samba-cvs
mailing list