From 1c90eb02a45314323ee882c0b898d1e607a86351 Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Sun, 10 Feb 2013 20:08:18 +0100 Subject: [PATCH] fix warning of scan-build; it doesn't see we would exit() before. --- citadel/utils/citmail.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/citadel/utils/citmail.c b/citadel/utils/citmail.c index becdb9abc..651e561d7 100644 --- a/citadel/utils/citmail.c +++ b/citadel/utils/citmail.c @@ -228,7 +228,9 @@ int main(int argc, char **argv) { if (debug) fprintf(stderr, "citmail: error parsing hostname\n"); cleanup(3); } - *ep = '\0'; + else + *ep = '\0'; + strncpy(hostname, sp, sizeof hostname); snprintf(fromline, sizeof fromline, "From: %s@%s", pw->pw_name, hostname); -- 2.30.2