EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  <19951996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  <19951996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: TS - EAST from GMT
From: Andrew Johnson <[email protected]>
Date: Tue, 17 Jan 1995 17:39:21 GMT
Since no one else has raised this yet, I thought I ought to:

> > From [email protected] Mon Jan 16 06:27:23 1995

> > The code below in tsSubr.c (line 902)  doesn't work if EPICS_TS_MIN_WEST 
> > negative.
> > 
> >     assert(pStamp->secPastEpoch >= tsMinWest * 60);
> > 
> > The correct is (e.g.):
> > 
> >     if (tsMinWest>0) {
> >         assert(pStamp->secPastEpoch >= (unsigned long)(tsMinWest * 60));
> >     }

Isn't it bad practice to put an assert expression inside an if statement like 
that?  I suspect the real correction should be more like:

	assert((tsMinWest <= 0) || 
	       (pStamp->secPastEpoch >= (unsigned long)(tsMinWest * 60)))

I also imagine there ought to be some equivalent test for when tsMinWest is zero 
or negative, but I don't know out what it should be.

(pedant mode OFF)

- Andrew

          ,_}\_.        Andrew Johnson, Technology Division
         /      \       Royal Greenwich Observatory
~~~~~~~~| ,--/;. )~~~~  Madingley Road, Cambridge, UK
    .,  |/  (/  U       Phone: +44 (0)1223 374823
  .`., /_\ . .          Email: [email protected]
     wwWWWww'           WWW: http://cast0.ast.cam.ac.uk/~anj/




Navigate by Date:
Prev: Re: NI VXIcpu-030 Jeff Hill
Next: EPICS and Solaris 2.x greene%denali.UUCP
Index: 1994  <19951996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: TS - EAST from GMT Deb Kerstiens
Next: Re: IOC time 1min=90sec ?? Marty Kraimer
Index: 1994  <19951996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·