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:
@@ -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 ) */
|
||||
|
||||
Reference in New Issue
Block a user