PERFORCE change 93627 for review

Todd Miller Todd.Miller at sparta.com
Mon Mar 20 15:50:30 UTC 2006


On Mar 20, 2006, at 3:25 PM, Todd Miller wrote:

> http://perforce.freebsd.org/chv.cgi?CH=93627
>
> Change 93627 by millert at millert_p3 on 2006/03/20 15:25:46
>
> 	In fdcopy() set newfdp->fd_freefile after the first loop
> 	over fdp instead of the loop over newfdp.  This means we
> 	never enter fdused() with fd_freefile == -1.  It also fixes
> 	a bug when fdp->fd_lastfile == -1.  Previously, if
> 	fdp->fd_lastfile was -1 newfdp->fd_freefile would get set
> 	to 1 instead of 0 since newfdp->fd_lastfile is initialized
> 	to 0 and newfdp->fd_freefile will not have been set in the
> 	first loop (which doesn't run at all in this case).
> 	It's not clear why newfdp->fd_freefile is -1 at this point.

That last line should have read:
     It's not clear why newfdp->fd_lastfile is -1 at this point.

  - todd


More information about the p4-projects mailing list