From 435b218a1adab47226cb86144bb4e4d176c3b89c Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Tue, 24 May 2011 21:53:16 +0000 Subject: [PATCH] Static analyzer fixes; - fix uninitialized access in case of us sending 404 - remove unneeded duplicate line. --- webcit/context_loop.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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, -- 2.39.2