[BACK]Return to ch.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / less

Diff for /src/usr.bin/less/ch.c between version 1.14 and 1.15

version 1.14, 2015/11/09 16:39:13 version 1.15, 2015/11/09 16:42:35
Line 226 
Line 226 
                  */                   */
                 if (!(ch_flags & CH_CANSEEK))                  if (!(ch_flags & CH_CANSEEK))
                         return ('?');                          return ('?');
                 if (lseek(ch_file, (off_t)pos, SEEK_SET) == BAD_LSEEK) {                  if (lseek(ch_file, (off_t)pos, SEEK_SET) == (off_t)-1) {
                         error("seek error", NULL);                          error("seek error", NULL);
                         clear_eol();                          clear_eol();
                         return (EOI);                          return (EOI);
Line 655 
Line 655 
         }          }
 #endif  #endif
   
         if (lseek(ch_file, (off_t)0, SEEK_SET) == BAD_LSEEK) {          if (lseek(ch_file, (off_t)0, SEEK_SET) == (off_t)-1) {
                 /*                  /*
                  * Warning only; even if the seek fails for some reason,                   * Warning only; even if the seek fails for some reason,
                  * there's a good chance we're at the beginning anyway.                   * there's a good chance we're at the beginning anyway.
Line 728 
Line 728 
 int  int
 seekable(int f)  seekable(int f)
 {  {
         return (lseek(f, (off_t)1, SEEK_SET) != BAD_LSEEK);          return (lseek(f, (off_t)1, SEEK_SET) != (off_t)-1);
 }  }
   
 /*  /*

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15