Typo in top 2.5

richard.r.grady..jr r4 at cbnews.ATT.COM
Wed Jun 7 07:35:04 AEST 1989


In article <16964 at sequent.UUCP> phil at 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 at mvuxd.att.com          ...!att!mvuxd!r4 



More information about the Comp.sources.bugs mailing list