summaryrefslogtreecommitdiffstats
path: root/usr.bin/diff/diffreg.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2003-06-25 03:53:59 +0000
committerderaadt <deraadt@openbsd.org>2003-06-25 03:53:59 +0000
commit91cf91eeec978125080d4e998a2fe316f7b6c38a (patch)
tree9dba727b62986d6fbcc1e4c8a4f5dcbfbe311e63 /usr.bin/diff/diffreg.c
parentmore knf (diff)
downloadwireguard-openbsd-91cf91eeec978125080d4e998a2fe316f7b6c38a.tar.xz
wireguard-openbsd-91cf91eeec978125080d4e998a2fe316f7b6c38a.zip
use SEEK_SET with fseek()
Diffstat (limited to 'usr.bin/diff/diffreg.c')
-rw-r--r--usr.bin/diff/diffreg.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/diff/diffreg.c b/usr.bin/diff/diffreg.c
index aefe8b55c66..ababfefac16 100644
--- a/usr.bin/diff/diffreg.c
+++ b/usr.bin/diff/diffreg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: diffreg.c,v 1.11 2003/06/25 03:50:27 deraadt Exp $ */
+/* $OpenBSD: diffreg.c,v 1.12 2003/06/25 03:53:59 deraadt Exp $ */
/*
* Copyright (C) Caldera International Inc. 2001-2002.
@@ -398,7 +398,7 @@ prepare(int i, FILE *fd)
struct line *p;
int j, h;
- fseek(fd, 0, 0);
+ fseek(fd, (off_t)0, SEEK_SET);
p = talloc(3 * sizeof(struct line));
for (j = 0; (h = readhash(fd));) {
p = ralloc(p, (++j + 3) * sizeof(struct line));
@@ -911,7 +911,7 @@ fetch(long *f, int a, int b, FILE *lb, char *s, int oldfile)
inifdef = 1 + oldfile;
}
for (i = a; i <= b; i++) {
- fseek(lb, f[i - 1], 0);
+ fseek(lb, f[i - 1], SEEK_SET);
nc = f[i] - f[i - 1];
if (opt != D_IFDEF)
prints(s);
@@ -1016,7 +1016,7 @@ asciifile(FILE *f)
char buf[BUFSIZ], *cp;
int cnt;
- fseek(f, 0, 0);
+ fseek(f, (off_t)0, SEEK_SET);
cnt = fread(buf, 1, BUFSIZ, f);
cp = buf;
while (--cnt >= 0)