summaryrefslogtreecommitdiffstats
path: root/usr.bin/diff3/diff3prog.c
diff options
context:
space:
mode:
authortobias <tobias@openbsd.org>2007-09-10 14:29:53 +0000
committertobias <tobias@openbsd.org>2007-09-10 14:29:53 +0000
commita52c79cd89b98bad71f1be2d3c15f4f5e57120b6 (patch)
treeff8409067e933072693b0dea0f1eff8be45c72ef /usr.bin/diff3/diff3prog.c
parentAllow port specification in our CVSROOT which is used for our (diff)
downloadwireguard-openbsd-a52c79cd89b98bad71f1be2d3c15f4f5e57120b6.tar.xz
wireguard-openbsd-a52c79cd89b98bad71f1be2d3c15f4f5e57120b6.zip
Proper use of fseek/fseeko macros.
OK joris@, otto@
Diffstat (limited to 'usr.bin/diff3/diff3prog.c')
-rw-r--r--usr.bin/diff3/diff3prog.c8
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)