summaryrefslogtreecommitdiff
path: root/source3/web
diff options
context:
space:
mode:
authorVolker Lendecke <vl@sernet.de>2007-11-24 17:27:54 +0100
committerVolker Lendecke <vl@sernet.de>2007-12-05 14:39:07 +0100
commit78c6ee0090f4122bc25baaacb5546517ad4b7bc6 (patch)
tree7b45cf85ff927e70552782b65bd73e50a637195f /source3/web
parent66af0700396a5a5245aa25c95d70a620025b29c9 (diff)
downloadsamba-78c6ee0090f4122bc25baaacb5546517ad4b7bc6.tar.gz
samba-78c6ee0090f4122bc25baaacb5546517ad4b7bc6.tar.bz2
samba-78c6ee0090f4122bc25baaacb5546517ad4b7bc6.zip
Remove some globals
(This used to be commit 31d0a846db08d845e6cdfd85def4ac1c34031e02)
Diffstat (limited to 'source3/web')
-rw-r--r--source3/web/swat.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/source3/web/swat.c b/source3/web/swat.c
index b36168f71f..75a7f1939a 100644
--- a/source3/web/swat.c
+++ b/source3/web/swat.c
@@ -324,12 +324,19 @@ static void show_parameter(int snum, struct parm_struct *parm)
_("Set Default"), make_parm_name(parm->label),(int)(parm->def.ivalue));
break;
- case P_OCTAL:
- printf("<input type=text size=8 name=\"parm_%s\" value=%s>", make_parm_name(parm->label), octal_string(*(int *)ptr));
- printf("<input type=button value=\"%s\" onClick=\"swatform.parm_%s.value=\'%s\'\">",
- _("Set Default"), make_parm_name(parm->label),
- octal_string((int)(parm->def.ivalue)));
+ case P_OCTAL: {
+ char *o;
+ o = octal_string(*(int *)ptr);
+ printf("<input type=text size=8 name=\"parm_%s\" value=%s>",
+ make_parm_name(parm->label), o);
+ TALLOC_FREE(o);
+ o = octal_string((int)(parm->def.ivalue));
+ printf("<input type=button value=\"%s\" "
+ "onClick=\"swatform.parm_%s.value=\'%s\'\">",
+ _("Set Default"), make_parm_name(parm->label), o);
+ TALLOC_FREE(o);
break;
+ }
case P_ENUM:
printf("<select name=\"parm_%s\">",make_parm_name(parm->label));