summaryrefslogtreecommitdiffstats
path: root/syslog.c
diff options
context:
space:
mode:
Diffstat (limited to 'syslog.c')
-rw-r--r--syslog.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/syslog.c b/syslog.c
index f544c110..e42ff0b8 100644
--- a/syslog.c
+++ b/syslog.c
@@ -93,11 +93,12 @@ val openlog_wrap(val wident, val optmask, val facility)
{
static char *ident;
char *old_ident = ident;
-
+
+ optmask = default_arg(optmask, zero);
+ facility = default_arg(facility, num_fast(LOG_USER));
+
ident = utf8_dup_to(c_str(wident));
- openlog(ident,
- if3(optmask, c_num(optmask), 0),
- if3(facility, c_num(facility), LOG_USER));
+ openlog(ident, c_num(optmask), c_num(facility));
free(old_ident);
return nil;