diff options
author | Tobias Stoeckmann <tobias@cvs.openbsd.org> | 2007-09-10 14:29:54 +0000 |
---|---|---|
committer | Tobias Stoeckmann <tobias@cvs.openbsd.org> | 2007-09-10 14:29:54 +0000 |
commit | 4bb6947b738392d059ccec81a601802f2a3f67e1 (patch) | |
tree | 6a47a9a7c15a9808ef0d3524f9dd977949038843 /usr.bin/diff3 | |
parent | e617d3130f4ee9ff3df5781cfc30d5a8c8d9a52c (diff) |
Proper use of fseek/fseeko macros.
OK joris@, otto@
Diffstat (limited to 'usr.bin/diff3')
-rw-r--r-- | usr.bin/diff3/diff3prog.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/diff3/diff3prog.c b/usr.bin/diff3/diff3prog.c index 5b7f6d83ee5..c7456c52c74 100644 --- a/usr.bin/diff3/diff3prog.c +++ b/usr.bin/diff3/diff3prog.c @@ -1,4 +1,4 @@ -/* $OpenBSD: diff3prog.c,v 1.8 2005/11/22 16:00:49 markus Exp $ */ +/* $OpenBSD: diff3prog.c,v 1.9 2007/09/10 14:29:53 tobias Exp $ */ /* * Copyright (C) Caldera International Inc. 2001-2002. @@ -71,7 +71,7 @@ static const char copyright[] = #endif /* not lint */ #ifndef lint -static const char rcsid[] = "$OpenBSD: diff3prog.c,v 1.8 2005/11/22 16:00:49 markus Exp $"; +static const char rcsid[] = "$OpenBSD: diff3prog.c,v 1.9 2007/09/10 14:29:53 tobias Exp $"; #endif /* not lint */ #include <stdio.h> @@ -514,7 +514,7 @@ repos(int nchar) int i; for (i = 0; i < 2; i++) - (void)fseek(fp[i], (long)-nchar, 1); + (void)fseek(fp[i], (long)-nchar, SEEK_CUR); } __dead void @@ -554,7 +554,7 @@ edscript(int n) prange(&de[n].old); else printf("%da\n=======\n", de[n].old.to -1); - (void)fseek(fp[2], (long)de[n].new.from, 0); + (void)fseek(fp[2], (long)de[n].new.from, SEEK_SET); for (k = de[n].new.to-de[n].new.from; k > 0; k-= j) { j = k > BUFSIZ ? BUFSIZ : k; if (fread(block, 1, j, fp[2]) != j) |