summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2014-11-08 09:41:42 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2014-11-08 09:41:42 -0800
commitb1e8e29448467d875b2efe5c83043ec2770e18d6 (patch)
tree40732977aaa2a96306233498566f1b2467b74592
parent6d42b63eb7c9c7da89d431db6f28aff1928bb22a (diff)
Use SEEK_* names instead of raw numbers for fseek whence argument
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--imake.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/imake.c b/imake.c
index c20cd4a..f23f2f1 100644
--- a/imake.c
+++ b/imake.c
@@ -444,7 +444,7 @@ showit(FILE *fd)
char buf[ BUFSIZ ];
int red;
- fseek(fd, 0, 0);
+ fseek(fd, 0, SEEK_SET);
while ((red = fread(buf, 1, BUFSIZ, fd)) > 0)
writetmpfile(stdout, buf, red, "stdout");
if (red < 0)
@@ -1964,7 +1964,7 @@ ReadLine(FILE *tmpfd, const char *tmpfname)
/*
* Slurp it all up.
*/
- fseek(tmpfd, 0, 0);
+ fseek(tmpfd, 0, SEEK_SET);
if (fstat(fileno(tmpfd), &st) < 0)
LogFatal("cannot stat %s for size", tmpMakefile);
pline = buf = Emalloc((int)st.st_size+1);
@@ -1973,7 +1973,7 @@ ReadLine(FILE *tmpfd, const char *tmpfname)
LogFatal("cannot read %s", tmpMakefile);
end = buf + total_red;
*end = '\0';
- fseek(tmpfd, 0, 0);
+ fseek(tmpfd, 0, SEEK_SET);
#if defined(SYSV) || defined(WIN32) || defined(USE_FREOPEN)
tmpfd = freopen(tmpfname, "w+", tmpfd);
# ifdef WIN32