cfline() already allocates a filed structure on the heap, so we can avoid redundant memory allocations by skipping a second calloc() inside addfile(). addfile() can be removed altogether since a simple STAILQ_INSERT_TAIL() will add the filed to the global filed list.
Details
Details
- Reviewers
markj emaste - Commits
- rG2d69e4c37332: syslogd: Remove addfile() and free up some memory
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
I think it would have been a bit clearer if D41358 was first, although it's not worth extra effort to recreate the patch set that way.