Article View: comp.bugs.misc
Article #166Re: Typo in top 2.5
From: richard.r.grady..jr
Date: Tue, 06 Jun 1989 21:35
Date: Tue, 06 Jun 1989 21:35
20 lines
1222 bytes
1222 bytes
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!
-------------------------------------------------------------------
Dick Grady r4@mvuxd.att.com ...!att!mvuxd!r4
Technical Details
Message-ID:
<7189@cbnews.ATT.COM>Path:
arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ukma!tut.cis.ohio-state.edu!att!cbnews!r4References:
<16964@sequent.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ukma!tut.cis.ohio-state.edu!att!cbnews!r4 From: r4@cbnews.ATT.COM (richard.r.grady..jr) Newsgroups: comp.bugs.misc,comp.sources.bugs,comp.sys.sequent Subject: Re: Typo in top 2.5 Message-ID: <7189@cbnews.ATT.COM> Date: 6 Jun 89 21:35:04 GMT References: <16964@sequent.UUCP> Reply-To: r4@cbnews.ATT.COM (richard.r.grady..jr) Organization: AT&T Bell Laboratories Lines: 20