From 209cf8013bc71ed739054f013062b44feea157d8 Mon Sep 17 00:00:00 2001 From: Jacob Nevins Date: Sun, 16 Jul 2023 16:00:29 +0100 Subject: [PATCH] Add missing consts around xlatlognam(). --- logging.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/logging.c b/logging.c index e065f1a4..ff687cb7 100644 --- a/logging.c +++ b/logging.c @@ -22,8 +22,9 @@ struct LogContext { int logtype; /* cached out of conf */ }; -static Filename *xlatlognam(Filename *s, char *hostname, int port, - struct tm *tm); +static Filename *xlatlognam(const Filename *s, + const char *hostname, int port, + const struct tm *tm); /* * Internal wrapper function which must be called for _all_ output @@ -451,10 +452,12 @@ void log_reconfig(LogContext *ctx, Conf *conf) * * "&Y":YYYY "&m":MM "&d":DD "&T":hhmmss "&h": "&&":& */ -static Filename *xlatlognam(Filename *src, char *hostname, int port, - struct tm *tm) +static Filename *xlatlognam(const Filename *src, + const char *hostname, int port, + const struct tm *tm) { - char buf[32], *bufp; + char buf[32]; + const char *bufp; int size; strbuf *buffer; const char *s;