diff options
author | Michael Adam <obnox@samba.org> | 2007-09-21 14:37:35 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:30:58 -0500 |
commit | c97fe37ea3d92a631e8da17c21dafae1db15e97b (patch) | |
tree | 8a198088c25da1fdd720da7e9d056186eb468380 /source3/printing | |
parent | 6873d5446e4cee76b022bfc0d33e9e8380e796c0 (diff) | |
download | samba-c97fe37ea3d92a631e8da17c21dafae1db15e97b.tar.gz samba-c97fe37ea3d92a631e8da17c21dafae1db15e97b.tar.bz2 samba-c97fe37ea3d92a631e8da17c21dafae1db15e97b.zip |
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)
Diffstat (limited to 'source3/printing')
-rw-r--r-- | source3/printing/nt_printing.c | 10 |
1 files changed, 5 insertions, 5 deletions
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;i<count;i++) { @@ -863,7 +863,7 @@ BOOL add_a_form(nt_forms_struct **list, const FORM *form, int *count) update=False; - unistr2_to_ascii(form_name, &form->name, 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<count; n++) { |