bug in "portable way to do nap()"

Brandon S. Allbery allbery at ncoast.UUCP
Tue Oct 18 07:22:43 AEST 1988


As quoted from <10450 at tekecs.TEK.COM> by andrew at frip.gwd.tek.com (Andrew Klossner):
+---------------
| >	int baudrate[] = {
| >		50,
| 
| This is followed by code which subscripts baudrate[tty.c_cflags&CBAUD].
| There's an off-by-one here.  baudrate[1], not baudrate[0], should be
+---------------

Oops (*blush*).  I knew that, but I was "coding on the run" and didn't stop
to think about baud rate B0....

++Brandon
-- 
Brandon S. Allbery, comp.sources.misc moderator and one admin of ncoast PA UN*X
uunet!hal.cwru.edu!ncoast!allbery  <PREFERRED!>	    ncoast!allbery at hal.cwru.edu
allbery at skybridge.sdi.cwru.edu	      <ALSO>		   allbery at uunet.uu.net
comp.sources.misc is moving off ncoast -- please do NOT send submissions direct
  (But the aliases are NOT on UUNET yet, use the aliases at backbone sites!)



More information about the Comp.unix.wizards mailing list