HomeFreeBSD

syslogd: Remove addfile() and free up some memory

Description

syslogd: Remove addfile() and free up some memory

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.

Reviewed by: markj, emaste
MFC after: 3 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D41359

Details

Provenance
jfreeAuthored on Sep 1 2023, 2:49 AM
markjCommitted on Sep 28 2023, 3:51 PM
Reviewer
markj
Differential Revision
D41359: syslogd: Remove addfile() and free up some memory
Parents
rG931d05fc088b: syslogd: Read configuration outside of init loop
Branches
Unknown
Tags
Unknown