diff options
Diffstat (limited to 'source3/param/loadparm.c')
-rw-r--r-- | source3/param/loadparm.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index dcdfbd7724..1c0b044598 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -2315,21 +2315,20 @@ static void lp_add_auto_services(char *str) homes = lp_servicenumber(HOMES_NAME); printers = lp_servicenumber(PRINTERS_NAME); - for (p=strtok(s,LIST_SEP);p;p=strtok(NULL,LIST_SEP)) - { - char *home = get_home_dir(p); - - if (lp_servicenumber(p) >= 0) continue; + for (p=strtok(s,LIST_SEP);p;p=strtok(NULL,LIST_SEP)) { + char *home = get_home_dir(p); - if (home && homes >= 0) - { - lp_add_home(p,homes,home); - continue; - } + if (lp_servicenumber(p) >= 0) continue; - if (printers >= 0 && pcap_printername_ok(p,NULL)) - lp_add_printer(p,printers); - } + if (home && homes >= 0) { + lp_add_home(p,homes,home); + continue; + } + + if (printers >= 0 && pcap_printername_ok(p,NULL)) { + lp_add_printer(p,printers); + } + } free(s); } |