summaryrefslogtreecommitdiff
path: root/usr.bin/gprof/aout.c
diff options
context:
space:
mode:
authorTobias Stoeckmann <tobias@cvs.openbsd.org>2007-09-10 14:29:54 +0000
committerTobias Stoeckmann <tobias@cvs.openbsd.org>2007-09-10 14:29:54 +0000
commit4bb6947b738392d059ccec81a601802f2a3f67e1 (patch)
tree6a47a9a7c15a9808ef0d3524f9dd977949038843 /usr.bin/gprof/aout.c
parente617d3130f4ee9ff3df5781cfc30d5a8c8d9a52c (diff)
Proper use of fseek/fseeko macros.
OK joris@, otto@
Diffstat (limited to 'usr.bin/gprof/aout.c')
-rw-r--r--usr.bin/gprof/aout.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/gprof/aout.c b/usr.bin/gprof/aout.c
index 7ee25c2349f..0b7deabe1b3 100644
--- a/usr.bin/gprof/aout.c
+++ b/usr.bin/gprof/aout.c
@@ -87,7 +87,7 @@ getnfile(const char *filename, char ***defaultEs)
static void
getstrtab(FILE *nfile, const char *filename)
{
- fseek(nfile, (long)(N_SYMOFF(xbuf) + xbuf.a_syms), 0);
+ fseek(nfile, (long)(N_SYMOFF(xbuf) + xbuf.a_syms), SEEK_SET);
if (fread(&ssiz, sizeof (ssiz), 1, nfile) == 0)
errx(1, "%s: no string table (old format?)" , filename );
strtab = calloc(ssiz, 1);
@@ -109,7 +109,7 @@ getsymtab(FILE *nfile, const char *filename)
long i;
/* pass1 - count symbols */
- fseek(nfile, (long)N_SYMOFF(xbuf), 0);
+ fseek(nfile, (long)N_SYMOFF(xbuf), SEEK_SET);
nname = 0;
for (i = xbuf.a_syms; i > 0; i -= sizeof(struct nlist)) {
fread(&nbuf, sizeof(nbuf), 1, nfile);
@@ -126,7 +126,7 @@ getsymtab(FILE *nfile, const char *filename)
askfor * sizeof(nltype));
/* pass2 - read symbols */
- fseek(nfile, (long)N_SYMOFF(xbuf), 0);
+ fseek(nfile, (long)N_SYMOFF(xbuf), SEEK_SET);
npe = nl;
nname = 0;
for (i = xbuf.a_syms; i > 0; i -= sizeof(struct nlist)) {
@@ -168,7 +168,7 @@ gettextspace(FILE *nfile)
xbuf.a_text);
return;
}
- (void)fseek(nfile, N_TXTOFF(xbuf), 0);
+ (void)fseek(nfile, N_TXTOFF(xbuf), SEEK_SET);
if (fread(textspace, 1, xbuf.a_text, nfile) != xbuf.a_text ) {
warnx("couldn't read text space: can't do -c");
free(textspace);