From e4e00036a2ac8f7286453cf616920cdb7023be63 Mon Sep 17 00:00:00 2001 From: op Date: Fri, 3 Nov 2023 13:40:07 +0000 Subject: [PATCH] initialize `format' earlier It's easier to see that it's never used un-initialized. ok tb@ --- usr.sbin/smtpd/lka_session.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/usr.sbin/smtpd/lka_session.c b/usr.sbin/smtpd/lka_session.c index cac9108349e..60429999a16 100644 --- a/usr.sbin/smtpd/lka_session.c +++ b/usr.sbin/smtpd/lka_session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lka_session.c,v 1.97 2021/09/22 17:19:58 eric Exp $ */ +/* $OpenBSD: lka_session.c,v 1.98 2023/11/03 13:40:07 op Exp $ */ /* * Copyright (c) 2011 Gilles Chehade @@ -523,10 +523,9 @@ lka_submit(struct lka_session *lks, struct rule *rule, struct expandnode *xn) log_warnx("commands executed from aliases " "run with %s privileges", SMTPD_USER); + format = "%s"; if (xn->type == EXPAND_FILENAME) format = "/usr/libexec/mail.mboxfile -f %%{mbox.from} %s"; - else if (xn->type == EXPAND_FILTER) - format = "%s"; (void)snprintf(ep->mda_exec, sizeof(ep->mda_exec), format, xn->u.buffer); } -- 2.20.1