🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.bugs.misc
Article #168

Re: Typo in top 2.5

#168
From: Tony Ivanov
Date: Wed, 07 Jun 1989 16:13
30 lines
1813 bytes
In article <7189@cbnews.ATT.COM> r4@cbnews.ATT.COM (richard.r.grady..jr) writes:
^In article <16964@sequent.UUCP> phil@sequent.UUCP (Phil Hochstetler) writes:
^- I noticed a typo in top 2.5 in the file "display.c".
^- The following code has an extra ";" at line 117.
^- 
^-    117	    if (mpid != lmpid);
^-    118	    {
^-    119		Move_to(x_lastpid, y_lastpid);
^-    120		printf("%5d", mpid);
^-    121		lmpid = mpid;
^-    122	    }
^- 
^- This bug is somewhat harmless but does increase the cpu time consumed.
^
^The ";" at the end of line 117 terminates the "if" statement.
^Thus lines 119-121 are ALWAYS executed,
^probably not what the programmer of top 2.5 intended.
^This doesn't seem to me to be a harmless bug!

Look at what the code does: moves to the correct location on the screen, then
prints out the "mpid" variable, then sets lmpid to mpid.  Even if mpid is the
same as lmpid, the output result is the same.  Seems pretty harmless to me!

				--Tony

-- 
/* My opinions...             *  Tony Ivanov   MS-4B       *  ...ucbvax!   */
/* shared by my company?!...  *  Grass Valley Group, Inc.  *  tektronix!   */
/* you've got to be kidding!  *  P.O. Box 1114             *  gvgpsa!      */
/* "tony@gvgpvd.GVG.TEK.COM"  *  Grass Valley, CA  95945   *  gvgpvd!tony  */
Technical Details
Message-ID: <1121@gvgpvd.GVG.TEK.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!zephyr!tektronix!gvgpsa!gvgpvd!tony
References: <16964@sequent.UUCP> <7189@cbnews.ATT.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!zephyr!tektronix!gvgpsa!gvgpvd!tony
From: tony@gvgpvd.GVG.TEK.COM (Tony Ivanov)
Newsgroups: comp.bugs.misc,comp.sources.bugs,comp.sys.sequent
Subject: Re: Typo in top 2.5
Message-ID: <1121@gvgpvd.GVG.TEK.COM>
Date: 7 Jun 89 16:13:22 GMT
References: <16964@sequent.UUCP> <7189@cbnews.ATT.COM>
Reply-To: tony@gvgpvd.GVG.TEK.COM (Tony Ivanov)
Organization: Grass Valley Group, Inc.; PVD
Lines: 30