summaryrefslogtreecommitdiffstats
path: root/usr.bin/cvs/diff_internals.c
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2016-10-15 22:20:17 +0000
committermillert <millert@openbsd.org>2016-10-15 22:20:17 +0000
commitae886706d96e041068fec744661eb66fc0146ae1 (patch)
tree86c038d432bf2f3c21f207fe98865dfbd3c32001 /usr.bin/cvs/diff_internals.c
parentrefactor the worker and monitor loops a little to make room for re-exec (diff)
downloadwireguard-openbsd-ae886706d96e041068fec744661eb66fc0146ae1.tar.xz
wireguard-openbsd-ae886706d96e041068fec744661eb66fc0146ae1.zip
Quiet compiler warnings. OK tomc@ tb@
Diffstat (limited to 'usr.bin/cvs/diff_internals.c')
-rw-r--r--usr.bin/cvs/diff_internals.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/cvs/diff_internals.c b/usr.bin/cvs/diff_internals.c
index 07eb2f82b2f..b75f128fe47 100644
--- a/usr.bin/cvs/diff_internals.c
+++ b/usr.bin/cvs/diff_internals.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: diff_internals.c,v 1.38 2015/11/05 09:48:21 nicm Exp $ */
+/* $OpenBSD: diff_internals.c,v 1.39 2016/10/15 22:20:17 millert Exp $ */
/*
* Copyright (C) Caldera International Inc. 2001-2002.
* All rights reserved.
@@ -455,13 +455,13 @@ prepare(int i, FILE *fd, off_t filesize, int flags)
rewind(fd);
- sz = (filesize <= SIZE_MAX ? filesize : SIZE_MAX) / 25;
+ sz = ((uintmax_t)filesize <= SIZE_MAX ? (size_t)filesize : SIZE_MAX) / 25;
if (sz < 100)
sz = 100;
p = xcalloc(sz + 3, sizeof(*p));
for (j = 0; (h = readhash(fd, flags));) {
- if (j == sz) {
+ if ((size_t)j == sz) {
sz = sz * 3 / 2;
p = xreallocarray(p, sz + 3, sizeof(*p));
}