diff options
author | Omar Polo <op@cvs.openbsd.org> | 2023-11-03 13:40:08 +0000 |
---|---|---|
committer | Omar Polo <op@cvs.openbsd.org> | 2023-11-03 13:40:08 +0000 |
commit | 97e46855cc99dbbf143207ec0629ae02983667cb (patch) | |
tree | 4d5c04bcbdd662a8be716029c9b12f33abc34c63 /usr.sbin | |
parent | 546c0c9a5d87a026c2bb69edd4b9f1cdd9338ecc (diff) |
initialize `format' earlier
It's easier to see that it's never used un-initialized.
ok tb@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/smtpd/lka_session.c | 5 |
1 files 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 <gilles@poolp.org> @@ -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); } |