1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-04-26 04:17:27 +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

@@ -60,7 +60,7 @@ void set_sysout(int version, char *sysout_file_name) {
exit(-1);
}
/* seek to IFPAGE */
if (lseek(sysout, IFPAGE_ADDRESS, 0) == -1) {
if (lseek(sysout, IFPAGE_ADDRESS, SEEK_SET) == -1) {
perror("sysout_loader: can't seek to IFPAGE");
exit(-1);
}
@@ -78,7 +78,7 @@ void set_sysout(int version, char *sysout_file_name) {
ifpage.minbversion = version;
/* seek to IFPAGE */
if (lseek(sysout, IFPAGE_ADDRESS, 0) == -1) {
if (lseek(sysout, IFPAGE_ADDRESS, SEEK_SET) == -1) {
perror("sysout_loader: can't seek to IFPAGE");
exit(-1);
}