1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-26 21:57:41 +03:00

r24999: Use the new regval_compose() function in regval_ctr_addvalue().

Michael
(This used to be commit dab9ffe602eaca478a73f3b882f543629ce3001e)
This commit is contained in:
Michael Adam 2007-09-07 14:54:30 +00:00 committed by Gerald (Jerry) Carter
parent cc7bc29757
commit 30ee281cae

View File

@ -329,27 +329,12 @@ int regval_ctr_addvalue( REGVAL_CTR *ctr, const char *name, uint16 type,
/* allocate a new value and store the pointer in the arrya */ /* allocate a new value and store the pointer in the arrya */
ctr->values[ctr->num_values] = TALLOC_P( ctr, REGISTRY_VALUE); ctr->values[ctr->num_values] = regval_compose(ctr, name, type, data_p,
if (!ctr->values[ctr->num_values]) { size);
if (ctr->values[ctr->num_values] == NULL) {
ctr->num_values = 0; ctr->num_values = 0;
return 0; return 0;
} }
/* init the value */
fstrcpy( ctr->values[ctr->num_values]->valuename, name );
ctr->values[ctr->num_values]->type = type;
if (size) {
ctr->values[ctr->num_values]->data_p = (uint8 *)TALLOC_MEMDUP(
ctr, data_p, size );
if (!ctr->values[ctr->num_values]->data_p) {
ctr->num_values = 0;
return 0;
}
} else {
ctr->values[ctr->num_values]->data_p = NULL;
}
ctr->values[ctr->num_values]->size = size;
ctr->num_values++; ctr->num_values++;
return ctr->num_values; return ctr->num_values;