1/* 2 * Copyright (C) 1984-2007 Mark Nudelman 3 * 4 * You may distribute under the terms of either the GNU General Public 5 * License or the Less License, as specified in the README file. 6 * 7 * For more information about less, or for information on how to 8 * contact the author, see the README file. --- 668 unchanged lines hidden (view full) --- 677 close(f); 678 return (-1); 679 } 680 if ((buf = (char *) calloc((int)len, sizeof(char))) == NULL) 681 { 682 close(f); 683 return (-1); 684 } |
685 if (lseek(f, (off_t)0, SEEK_SET) == BAD_LSEEK) |
686 { 687 free(buf); 688 close(f); 689 return (-1); 690 } 691 n = read(f, buf, (unsigned int) len); 692 close(f); 693 if (n != len) --- 146 unchanged lines hidden --- |