From: Wilfried Goesgens Date: Tue, 24 May 2011 21:53:16 +0000 (+0000) Subject: Static analyzer fixes; X-Git-Tag: v7.87~17^2~7 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=435b218a1adab47226cb86144bb4e4d176c3b89c Static analyzer fixes; - fix uninitialized access in case of us sending 404 - remove unneeded duplicate line. --- diff --git a/webcit/context_loop.c b/webcit/context_loop.c index b506428b0..6d01f6409 100644 --- a/webcit/context_loop.c +++ b/webcit/context_loop.c @@ -436,7 +436,6 @@ int ReadHTTPRequest (ParsedHttpHdrs *Hdr) StrBufExtract_token(HeaderName, Line, 0, ':'); pchs = ChrPtr(Line); - pche = pchs + StrLength(Line); pch = pchs + StrLength(HeaderName) + 1; pche = pchs + StrLength(Line); while ((pch < pche) && isspace(*pch)) @@ -522,6 +521,9 @@ void context_loop(ParsedHttpHdrs *Hdr) do_404(); + /* How long did this transaction take? */ + gettimeofday(&tx_finish, NULL); + lprintf(9, "HTTP: 404 [%ld.%06ld] %s %s \n", ((tx_finish.tv_sec*1000000 + tx_finish.tv_usec) - (tx_start.tv_sec*1000000 + tx_start.tv_usec)) / 1000000, ((tx_finish.tv_sec*1000000 + tx_finish.tv_usec) - (tx_start.tv_sec*1000000 + tx_start.tv_usec)) % 1000000,