Make sure list is free'd in case of error. A bit cleanups as well.
If a file starts with the terminator string, at least it won't be ignored if it's longer.
Exit with error if connection is closed before having received CFD_TERMINATOR.
No need for memset, but explicitly set the double bytes to '\0' to show the intent.
Make more clear that we're waiting for double '\0'.
Separate the per-connection stat cache.
If client fails to run time() send 0 in SYNCH packet. Server should then not fail, unless denybadclocks is set.
Fits in one line.
Try to log TLS errors that are easier to consume.
Do not exit cf-serverd on SIGPIPE.
Merge pull request #1984 from jimis/conn_cache

Small clean-ups and leak fixes in the OPENDIR mechanism.
Merge pull request #1996 from jimis/master

Do not kill on sigHUP. Improve TLS messages.
Petty space changes.

Don't leave space between function name and open parentheses.
Put first line of function on a line after the the opening brace.
Clean-up in LinuxDebianSanitizeIssue()

Make its @brief actually brief.  Describe what it does more
accurately.  Its caller ignored its return which was always success;
so don't bother with it, just be void.  The implementation was messy;
tidied it up and simplified it.
Split some long lines, ditch some superfluous assignments.

Assigning a variable the value it already has is just distracting.

When a condition combines three flags with || and the flags are very
similar, it's much easier to see what they share and where they differ
if they're lined up vertically, with the identical parts equally
indented.
Simplify DetermineCfenginePort().

Make a variable more local, turn an else { if ... } into an else if.
Only Log() that we've set the port if we actually did set it.
Simplify return of a boolean.
Prefer strlcpy over snprintf; and use sizeof()
Minor de-uglifications.

Made variables more local, turn assignments into initializers for
declarations (especially where they were inside a conditional before),
skip spurious parentheses round various conditions.  Drop space
between assert and its parameter list.  Kill some fatuous casts.
CFE2 had no extra protocol field, it defaulted to community.