From: Wilfried Goesgens Date: Sun, 10 Feb 2013 19:08:18 +0000 (+0100) Subject: fix warning of scan-build; it doesn't see we would exit() before. X-Git-Tag: v8.20~114 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=1c90eb02a45314323ee882c0b898d1e607a86351 fix warning of scan-build; it doesn't see we would exit() before. --- 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);