summaryrefslogtreecommitdiffstats
path: root/edit.c
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2021-07-17 15:34:41 -0700
committerKevin McCarthy <kevin@8t8.us>2021-07-17 15:34:41 -0700
commit1588a0782438226e5fac7d59ae5cb5cc126b9888 (patch)
tree775d541425f93558d2a101311891dd3cd108e10d /edit.c
parentdf727efb43e751b9d089784c9c55fb6a083b25e2 (diff)
Use SEEK_SET and SEEK_END for fseek/fseeko whence parameter.
Thanks to Vincent Lefèvre for pointing out the incorrect usage. POSIX does not specify the actual values (although they are evidently commonly in use).
Diffstat (limited to 'edit.c')
-rw-r--r--edit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/edit.c b/edit.c
index 56898ec6..f46112f6 100644
--- a/edit.c
+++ b/edit.c
@@ -78,7 +78,7 @@ be_snarf_data (FILE *f, char **buf, int *bufmax, int *buflen, LOFF_T offset,
tmplen = sizeof (tmp) - tmplen;
}
- fseeko (f, offset, 0);
+ fseeko (f, offset, SEEK_SET);
while (bytes > 0)
{
if (fgets (p, tmplen - 1, f) == NULL) break;