Return to edit.c CVS log | Up to [local] / src / usr.bin / less |
version 1.17, 2015/11/09 16:39:13 | version 1.18, 2015/11/09 16:42:35 | ||
---|---|---|---|
|
|
||
* Append: open the file and seek to the end. | * Append: open the file and seek to the end. | ||
*/ | */ | ||
logfile = open(filename, O_WRONLY | O_APPEND); | logfile = open(filename, O_WRONLY | O_APPEND); | ||
if (lseek(logfile, (off_t)0, SEEK_END) == BAD_LSEEK) { | if (lseek(logfile, (off_t)0, SEEK_END) == (off_t)-1) { | ||
close(logfile); | close(logfile); | ||
logfile = -1; | logfile = -1; | ||
} | } |