summaryrefslogtreecommitdiff
path: root/source3/param/loadparm.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-08-10 05:22:10 +0000
committerAndrew Tridgell <tridge@samba.org>1998-08-10 05:22:10 +0000
commitbad66abfe7c64069b76686563030ca6819fe4cc0 (patch)
treeb62952ee2de1c1baf43a61f0dbbbadfc7e224e4f /source3/param/loadparm.c
parent89a6525b3c21ee67462d5091d23450cf31e6951c (diff)
downloadsamba-bad66abfe7c64069b76686563030ca6819fe4cc0.tar.gz
samba-bad66abfe7c64069b76686563030ca6819fe4cc0.tar.bz2
samba-bad66abfe7c64069b76686563030ca6819fe4cc0.zip
moved username.c into lib/ so we no longer $(PASSDB_OBJ) in most
utilities (This used to be commit 745d38bfe7a989a602d14b8a04757893ae40ba8e)
Diffstat (limited to 'source3/param/loadparm.c')
-rw-r--r--source3/param/loadparm.c25
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);
}