1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-02-07 00:37:10 +00:00

Use SEEK_SET for third arg to *seek() functions. (#139)

Instead of sometimes passing `0` to `lseek` and friends, we should
use the standard symbolic constant `SEEK_SET`.
This commit is contained in:
Bruce Mitchener
2020-12-28 15:18:41 +07:00
committed by GitHub
parent a986b1e57a
commit 999851e60c
5 changed files with 10 additions and 9 deletions

View File

@@ -421,7 +421,7 @@ LispPTR vmem_save(char *sysout_file_name)
int contig_pages = 0;
register char *base_addr;
TIMEOUT(rval = lseek(sysout, i * BYTESPER_PAGE, 0));
TIMEOUT(rval = lseek(sysout, i * BYTESPER_PAGE, SEEK_SET));
if (rval == -1) {
err_mess("lseek", errno);
return (FILECANNOTSEEK);
@@ -472,7 +472,7 @@ LispPTR vmem_save(char *sysout_file_name)
}
/* seek to IFPAGE */
TIMEOUT(rval = lseek(sysout, (long)FP_IFPAGE, 0));
TIMEOUT(rval = lseek(sysout, (long)FP_IFPAGE, SEEK_SET));
if (rval == -1) {
err_mess("lseek", errno);
return (FILECANNOTSEEK);