Many of syslogd's global configuration options are declared as integers but are treated as booleans. Declare those options as booleans instead.
Details
- Reviewers
markj emaste - Commits
- rG3f8b49dd1af1: syslogd: Replace int with bool, where applicable
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
In future when uploading patches via the web interface please generate them with -U99999 so that Phabricator can show full context (see https://wiki.freebsd.org/Phabricator for details)
Debug might make sense as an int again in the future if we want to support different debug levels, but bool makes sense right now.
The needdofsync global variable was initialized as true, when it should be false. Fix this.
Oops! Thought I did. Just regenerated the patches. Will upload with more context from here on.
The needdofsync global variable was initialized as true, when it should be false. Fix this.
We may want to just leave the 0/false globals without explicit initialization.
I just carried over syslogd's code, translating 0 to false and 1 to true.
I believe I address your suggestion in a later patch.
I just carried over syslogd's code, translating 0 to false and 1 to true.
Yeah, certainly if we're going to remove the 0/false initialization it would be done in a prior or subsequent commit
usr.sbin/syslogd/syslogd.c | ||
---|---|---|
390 | this one remains int but uses true? |