diff options
Diffstat (limited to 'source3/printing/print_generic.c')
-rw-r--r-- | source3/printing/print_generic.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/source3/printing/print_generic.c b/source3/printing/print_generic.c index e1517c5dcb..4d77b827bf 100644 --- a/source3/printing/print_generic.c +++ b/source3/printing/print_generic.c @@ -55,7 +55,7 @@ static int print_run_command(int snum,char *command, int *outfd, ...) { pstring syscmd; - char *p, *arg; + char *arg; int ret; va_list ap; va_start(ap, outfd); @@ -75,10 +75,8 @@ static int print_run_command(int snum,char *command, int *outfd, ...) } va_end(ap); - p = PRINTERNAME(snum); - - pstring_sub(syscmd, "%p", p); - standard_sub_snum(snum,syscmd); + pstring_sub(syscmd, "%p", PRINTERNAME(snum)); + standard_sub_snum(snum,syscmd,sizeof(syscmd)); ret = smbrun(syscmd,outfd); |