From 96253e9fec23f465f064dfbe1ae469d03c1d3267 Mon Sep 17 00:00:00 2001 From: Yann Dirson Date: Wed, 19 Feb 2014 23:10:05 +0100 Subject: [PATCH] Use SEEK_SET instead of literal 0 in lseek calls. --- gnushogi/book.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gnushogi/book.c b/gnushogi/book.c index 6df98e6..423749f 100644 --- a/gnushogi/book.c +++ b/gnushogi/book.c @@ -593,7 +593,7 @@ static ULONG currentoffset; #define WriteAdmin() \ { \ - lseek(gfd, 0, 0); \ + lseek(gfd, 0, SEEK_SET); \ write(gfd, (char *)&ADMIN, sizeof_gdxadmin); \ } @@ -601,7 +601,7 @@ static ULONG currentoffset; { \ if (mustwrite ) \ { \ - lseek(gfd, currentoffset, 0); \ + lseek(gfd, currentoffset, SEEK_SET); \ write(gfd, (char *)&DATA, sizeof_gdxdata); \ mustwrite = false; \ } \ @@ -609,13 +609,13 @@ static ULONG currentoffset; static int ReadAdmin(void) { - lseek(gfd, 0, 0); + lseek(gfd, 0, SEEK_SET); return (sizeof_gdxadmin == read(gfd, (char *)&ADMIN, sizeof_gdxadmin)); } static int ReadData(struct gdxdata *DATA) { - lseek(gfd, currentoffset, 0); + lseek(gfd, currentoffset, SEEK_SET); return (sizeof_gdxdata == read(gfd, (char *)DATA, sizeof_gdxdata)); } -- 1.7.0.4