From c97fe37ea3d92a631e8da17c21dafae1db15e97b Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Fri, 21 Sep 2007 14:37:35 +0000 Subject: r25294: Tidy up callers of unistr2_to_ascii() to pass sizeof(target_area) to the maxeln parameter instead of sizeof(target_area) - 1 (or even sizeof(fstring) - 1 in some places. I hope these were really all there were. Michael (This used to be commit 9a28be220df622322857dfe102fa35e108f932dc) --- source3/printing/nt_printing.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source3/printing') diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index 55023823a0..cbd220d260 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -760,7 +760,7 @@ BOOL get_a_builtin_ntform(UNISTR2 *uni_formname,nt_forms_struct *form) { int i,count; fstring form_name; - unistr2_to_ascii(form_name, uni_formname, sizeof(form_name)-1); + unistr2_to_ascii(form_name, uni_formname, sizeof(form_name)); DEBUGADD(6,("Looking for builtin form %s \n", form_name)); count = sizeof(default_forms) / sizeof(default_forms[0]); for (i=0;iname, sizeof(form_name)-1); + unistr2_to_ascii(form_name, &form->name, sizeof(form_name)); for (n=0; n<*count; n++) { if ( strequal((*list)[n].name, form_name) ) { update=True; @@ -876,7 +876,7 @@ BOOL add_a_form(nt_forms_struct **list, const FORM *form, int *count) DEBUG(0,("add_a_form: failed to enlarge forms list!\n")); return False; } - unistr2_to_ascii((*list)[n].name, &form->name, sizeof((*list)[n].name)-1); + unistr2_to_ascii((*list)[n].name, &form->name, sizeof((*list)[n].name)); (*count)++; } @@ -906,7 +906,7 @@ BOOL delete_a_form(nt_forms_struct **list, UNISTR2 *del_name, int *count, WERROR *ret = WERR_OK; - unistr2_to_ascii(form_name, del_name, sizeof(form_name)-1); + unistr2_to_ascii(form_name, del_name, sizeof(form_name)); for (n=0; n<*count; n++) { if (!strncmp((*list)[n].name, form_name, strlen(form_name))) { @@ -938,7 +938,7 @@ void update_a_form(nt_forms_struct **list, const FORM *form, int count) { int n=0; fstring form_name; - unistr2_to_ascii(form_name, &(form->name), sizeof(form_name)-1); + unistr2_to_ascii(form_name, &(form->name), sizeof(form_name)); DEBUG(106, ("[%s]\n", form_name)); for (n=0; n