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

@@ -11,6 +11,7 @@
#include "version.h"
#include <stdio.h>
#include <unistd.h>
#include <pixrect/pixrect_hs.h>
#define FALSE 0
@@ -132,7 +133,7 @@ int position_rasterfile(RASTERFILE_INFO *fileinfo, int n)
if (n > 0) {
position = sizeof(struct rasterfile) + (n - 1) * fileinfo->rh.ras_length;
if ((status = fseek(fileinfo->file, position, (int)0)) == 0) {
if ((status = fseek(fileinfo->file, position, SEEK_SET)) == 0) {
/* normal return */
return (TRUE);
} /* end if( status ) */