nightmaremail

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 1961479e0099897c37621362bf872306cb70dcc1
parent 75a935b5def0bc2fe3e282c643ca5f48fe8c9a90
Author: Rolf Eike Beer <eike@sf-mail.de>
Date:   Fri, 27 Dec 2019 17:25:06 +0100

move some variables to a more local scope

Diffstat:
Mtcpto.c | 8+++-----
1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/tcpto.c b/tcpto.c @@ -36,7 +36,6 @@ int tcpto(ip) struct ip_address *ip; int n; int i; char *record; - datetime_sec when; flagwasthere = 0; @@ -52,7 +51,7 @@ int tcpto(ip) struct ip_address *ip; flagwasthere = 1; if (record[4] >= 2) { - when = (unsigned long) (unsigned char) record[11]; + datetime_sec when = (unsigned long) (unsigned char) record[11]; when = (when << 8) + (unsigned long) (unsigned char) record[10]; when = (when << 8) + (unsigned long) (unsigned char) record[9]; when = (when << 8) + (unsigned long) (unsigned char) record[8]; @@ -73,8 +72,6 @@ void tcpto_err(ip,flagerr) struct ip_address *ip; int flagerr; int i; char *record; datetime_sec when; - datetime_sec firstwhen; - int firstpos; datetime_sec lastwhen; if (!flagerr) @@ -127,7 +124,8 @@ void tcpto_err(ip,flagerr) struct ip_address *ip; int flagerr; if (i >= n) { - firstpos = -1; + int firstpos = -1; + datetime_sec firstwhen; record = tcpto_buf; for (i = 0;i < n;++i) {