daemon: style changes

This is not a functional change.
- Clean up whitespace (spaces where there should be tabs)
- Break up lines that are longer than 80

Reviewed by:	kevans
Pull Request:	https://github.com/freebsd/freebsd-src/pull/672
This commit is contained in:
Ihor Antonov 2023-03-02 23:17:01 -06:00 committed by Kyle Evans
parent dda4d97289
commit 39ea4280e4

View File

@ -190,7 +190,8 @@ main(int argc, char *argv[])
log_reopen = true;
break;
case 'l':
logparams.syslog_facility = get_log_mapping(optarg, facilitynames);
logparams.syslog_facility = get_log_mapping(optarg,
facilitynames);
if (logparams.syslog_facility == -1) {
errx(5, "unrecognized syslog facility");
}
@ -221,7 +222,8 @@ main(int argc, char *argv[])
}
break;
case 's':
logparams.syslog_priority = get_log_mapping(optarg, prioritynames);
logparams.syslog_priority = get_log_mapping(optarg,
prioritynames);
if (logparams.syslog_priority == -1) {
errx(4, "unrecognized syslog priority");
}
@ -266,7 +268,8 @@ main(int argc, char *argv[])
}
if (logparams.syslog_enabled) {
openlog(logparams.syslog_tag, LOG_PID | LOG_NDELAY, logparams.syslog_facility);
openlog(logparams.syslog_tag, LOG_PID | LOG_NDELAY,
logparams.syslog_facility);
}
/*
@ -652,7 +655,9 @@ do_output(const unsigned char *buf, size_t len, struct log_params *logpar)
if (write(logpar->output_fd, buf, len) == -1)
warn("write");
}
if (logpar->keep_fds_open && !logpar->syslog_enabled && logpar->output_fd == -1) {
if (logpar->keep_fds_open &&
!logpar->syslog_enabled &&
logpar->output_fd == -1) {
printf("%.*s", (int)len, buf);
}
}