summaryrefslogtreecommitdiff
path: root/source3/printing/nt_printing.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/printing/nt_printing.c')
-rw-r--r--source3/printing/nt_printing.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index a880184f3d..061b41e123 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -1272,17 +1272,16 @@ BOOL get_specific_param_by_index(NT_PRINTER_INFO_LEVEL printer, uint32 level, ui
i++;
}
- if (param != NULL)
- {
- /* exited because it exist */
- *type=param->type;
- StrnCpy(value, param->value, sizeof(value)-1);
- *data=(uint8 *)malloc(param->data_len*sizeof(uint8));
- memcpy(*data, param->data, param->data_len);
- *len=param->data_len;
- return (True);
- }
- return (False);
+ if (param == NULL)
+ return False;
+
+ /* exited because it exist */
+ *type=param->type;
+ StrnCpy(value, param->value, sizeof(fstring)-1);
+ *data=(uint8 *)malloc(param->data_len*sizeof(uint8));
+ memcpy(*data, param->data, param->data_len);
+ *len=param->data_len;
+ return True;
}
/****************************************************************************