From a52c79cd89b98bad71f1be2d3c15f4f5e57120b6 Mon Sep 17 00:00:00 2001 From: tobias Date: Mon, 10 Sep 2007 14:29:53 +0000 Subject: Proper use of fseek/fseeko macros. OK joris@, otto@ --- usr.bin/cvs/diff3.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'usr.bin/cvs/diff3.c') diff --git a/usr.bin/cvs/diff3.c b/usr.bin/cvs/diff3.c index 742cd2ccc3e..3f05e815907 100644 --- a/usr.bin/cvs/diff3.c +++ b/usr.bin/cvs/diff3.c @@ -1,4 +1,4 @@ -/* $OpenBSD: diff3.c,v 1.37 2007/06/28 21:38:09 xsa Exp $ */ +/* $OpenBSD: diff3.c,v 1.38 2007/09/10 14:29:53 tobias Exp $ */ /* * Copyright (C) Caldera International Inc. 2001-2002. @@ -72,12 +72,13 @@ static const char copyright[] = #ifndef lint static const char rcsid[] = - "$OpenBSD: diff3.c,v 1.37 2007/06/28 21:38:09 xsa Exp $"; + "$OpenBSD: diff3.c,v 1.38 2007/09/10 14:29:53 tobias Exp $"; #endif /* not lint */ #include #include #include +#include #include #include #include @@ -729,7 +730,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); } /* @@ -763,7 +764,7 @@ edscript(int n) prange(&de[n].old); else diff_output("%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, (size_t)1, (size_t)j, -- cgit v1.2.3-59-g8ed1b