On 3/4/12 4:32 PM, Chet Ramey wrote: > That's true, and I made this change some months ago. The question is > whether or not it makes a real difference, since the only use of that > variable is to check whether the return value from lseek is -1. I > suppose under the right set of circumstances it could.
Sorry, I forgot to attach the patch. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/
*** ../bash-4.2-patched/lib/sh/zread.c Mon Mar 2 08:54:45 2009 --- lib/sh/zread.c Thu Jul 28 18:16:53 2011 *************** *** 161,166 **** int fd; { ! off_t off; ! int r; off = lused - lind; --- 161,165 ---- int fd; { ! off_t off, r; off = lused - lind; *************** *** 169,173 **** r = lseek (fd, -off, SEEK_CUR); ! if (r >= 0) lused = lind = 0; } --- 168,172 ---- r = lseek (fd, -off, SEEK_CUR); ! if (r != -1) lused = lind = 0; }