From: "Arne Vajh�j" <ava@cri.dk>
To: dmeans@bellsouth.net
Subject: Re: What do you look for in C/C++ source? tm_year?
Date: 1997/09/04 [thread overview]
Message-ID: <340E66E5.87647499@cri.dk> (raw)
In-Reply-To: 340C34A2.FD0EE69F@bellsouth.net.no_spam
David Means wrote:
> If you're greping through 1000's of lines of ( C/C++ ) code for date related
> bugs, what do you look for? My first assumption is to find tm_year.
>
> What other stuff do you look for?
It is matter of how sure you want to be:
1) Search for year and f.ex. a dozen other suspect strings and inspect
the found locations manually. You will find most problem spots.
2) Inspect all code modules using time manually. You wil find almost
all problem spots.
3) Inspect everything manually. You wil find everything (assuming
actually done carefully).
So grep'ing is taking a chance, but if your cost-benefit analysis says,
that is the way to go, then ...
Other good strings to search for that come to my mind is:
gmtime,localtime,asciitime,ctime,strftime. But ask your
programmers what they usually use for year, if they often use f.ex. yy,
then add that to the list.
Arne
next prev parent reply other threads:[~1997-09-04 4:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-09-02 4:00 What do you look for in C/C++ source? tm_year? David Means
1997-09-02 4:00 ` Eric Buckley
1997-09-03 4:00 ` John A. Kroll
1997-09-04 4:00 ` Arne Vajh�j [this message]
[not found] ` <34101ba1.2323741@news.gate.net>
1997-09-05 4:00 ` Chris Waters
[not found] <340C34B7.1BE36F49@bellsouth.net.no_spam>
[not found] ` <340CAC2A.167E@stl.dec.com>
1997-09-03 4:00 ` Kaz Kylheku
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox