errno

Jonathan I. Kamens jik at cats.ucsc.edu
Tue Jun 18 07:16:59 AEST 1991


In article <2157 at mitisft.Convergent.COM>, dold at mitisft.Convergent.COM (Clarence Dold) writes:
|> printf("Errno %d: %s\n", want_err, 
|> 	want_err <= sys_nerr ? sys_errlist[want_err] : "Out of range" );

The "<=" should be "<".  Sys_nerr records the number of elements in the
sys_errlist array, which means the highest valid index in the array is
sys_nerr-1, and the lowest is 0.

-- 
Jonathan Kamens					jik at CATS.UCSC.EDU



More information about the Comp.unix.questions mailing list