svn commit: samba r24999 - in branches: SAMBA_3_2/source/registry
SAMBA_3_2_0/source/registry
obnox at samba.org
obnox at samba.org
Fri Sep 7 14:54:30 GMT 2007
Author: obnox
Date: 2007-09-07 14:54:30 +0000 (Fri, 07 Sep 2007)
New Revision: 24999
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=24999
Log:
Use the new regval_compose() function in regval_ctr_addvalue().
Michael
Modified:
branches/SAMBA_3_2/source/registry/reg_objects.c
branches/SAMBA_3_2_0/source/registry/reg_objects.c
Changeset:
Modified: branches/SAMBA_3_2/source/registry/reg_objects.c
===================================================================
--- branches/SAMBA_3_2/source/registry/reg_objects.c 2007-09-07 14:41:49 UTC (rev 24998)
+++ branches/SAMBA_3_2/source/registry/reg_objects.c 2007-09-07 14:54:30 UTC (rev 24999)
@@ -329,27 +329,12 @@
/* allocate a new value and store the pointer in the arrya */
- ctr->values[ctr->num_values] = TALLOC_P( ctr, REGISTRY_VALUE);
- if (!ctr->values[ctr->num_values]) {
+ ctr->values[ctr->num_values] = regval_compose(ctr, name, type, data_p,
+ size);
+ if (ctr->values[ctr->num_values] == NULL) {
ctr->num_values = 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++;
return ctr->num_values;
Modified: branches/SAMBA_3_2_0/source/registry/reg_objects.c
===================================================================
--- branches/SAMBA_3_2_0/source/registry/reg_objects.c 2007-09-07 14:41:49 UTC (rev 24998)
+++ branches/SAMBA_3_2_0/source/registry/reg_objects.c 2007-09-07 14:54:30 UTC (rev 24999)
@@ -329,27 +329,12 @@
/* allocate a new value and store the pointer in the arrya */
- ctr->values[ctr->num_values] = TALLOC_P( ctr, REGISTRY_VALUE);
- if (!ctr->values[ctr->num_values]) {
+ ctr->values[ctr->num_values] = regval_compose(ctr, name, type, data_p,
+ size);
+ if (ctr->values[ctr->num_values] == NULL) {
ctr->num_values = 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++;
return ctr->num_values;
More information about the samba-cvs
mailing list