1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

r25140: Less red bars to hurt my eyes...

(This used to be commit f935d21200)
This commit is contained in:
Michael Adam 2007-09-13 22:41:04 +00:00 committed by Gerald (Jerry) Carter
parent aaa0afaa26
commit 34991bbd0c

View File

@ -97,7 +97,8 @@ int regsubkey_ctr_delkey( REGSUBKEY_CTR *ctr, const char *keyname )
/* update if we have any keys left */
ctr->num_subkeys--;
if ( i < ctr->num_subkeys )
memmove( &ctr->subkeys[i], &ctr->subkeys[i+1], sizeof(char*) * (ctr->num_subkeys-i) );
memmove(&ctr->subkeys[i], &ctr->subkeys[i+1],
sizeof(char*) * (ctr->num_subkeys-i));
return ctr->num_subkeys;
}
@ -184,8 +185,8 @@ REGISTRY_VALUE* dup_registry_value( REGISTRY_VALUE *val )
{
if ( !(copy->data_p = (uint8 *)memdup( val->data_p,
val->size )) ) {
DEBUG(0,("dup_registry_value: memdup() failed for [%d] bytes!\n",
val->size));
DEBUG(0,("dup_registry_value: memdup() failed for [%d] "
"bytes!\n", val->size));
SAFE_FREE( copy );
return NULL;
}
@ -319,7 +320,9 @@ int regval_ctr_addvalue( REGVAL_CTR *ctr, const char *name, uint16 type,
if ( ctr->num_values == 0 ) {
ctr->values = TALLOC_P( ctr, REGISTRY_VALUE *);
} else {
ctr->values = TALLOC_REALLOC_ARRAY( ctr, ctr->values, REGISTRY_VALUE *, ctr->num_values+1 );
ctr->values = TALLOC_REALLOC_ARRAY(ctr, ctr->values,
REGISTRY_VALUE *,
ctr->num_values+1);
}
if (!ctr->values) {
@ -376,7 +379,8 @@ 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;
}