diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2014-11-08 09:41:42 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2014-11-08 09:41:42 -0800 |
commit | b1e8e29448467d875b2efe5c83043ec2770e18d6 (patch) | |
tree | 40732977aaa2a96306233498566f1b2467b74592 | |
parent | 6d42b63eb7c9c7da89d431db6f28aff1928bb22a (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.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 |