summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2010-05-24 14:08:01 +0200
committerMichael Adam <obnox@samba.org>2010-05-25 10:35:30 +0200
commitb5d0fdd96c835281378d21a7dc73b1fd8f100d9f (patch)
treeadf189082241ea7e99065ab684530d093d483d16 /source3
parentdcf2cc2806bcccef42adf84c8a60e875bc49efdf (diff)
downloadsamba-b5d0fdd96c835281378d21a7dc73b1fd8f100d9f.tar.gz
samba-b5d0fdd96c835281378d21a7dc73b1fd8f100d9f.tar.bz2
samba-b5d0fdd96c835281378d21a7dc73b1fd8f100d9f.zip
s3:nt_printing: use regval_ctr_init().
Diffstat (limited to 'source3')
-rw-r--r--source3/printing/nt_printing.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index d3808d83aa..1823b16a86 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -2897,6 +2897,7 @@ int add_new_printer_key( NT_PRINTER_DATA *data, const char *name )
{
NT_PRINTER_KEY *d;
int key_index;
+ WERROR werr;
if ( !name || !data )
return -1;
@@ -2916,8 +2917,10 @@ int add_new_printer_key( NT_PRINTER_DATA *data, const char *name )
data->keys[key_index].name = talloc_strdup( data, name );
- if ( !(data->keys[key_index].values = TALLOC_ZERO_P( data, struct regval_ctr )) )
+ werr = regval_ctr_init(data, &(data->keys[key_index].values));
+ if (!W_ERROR_IS_OK(werr)) {
return -1;
+ }
data->num_keys++;