Module Name: src
Committed By: riastradh
Date: Sat Jan 25 16:38:15 UTC 2014
Modified Files:
src/usr.bin/vndcompress: offtab.c
Log Message:
Get SIZE_MAX and OFF_MAX straight...
To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/usr.bin/vndcompress/offtab.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/vndcompress/offtab.c
diff -u src/usr.bin/vndcompress/offtab.c:1.12 src/usr.bin/vndcompress/offtab.c:1.13
--- src/usr.bin/vndcompress/offtab.c:1.12 Sat Jan 25 16:26:17 2014
+++ src/usr.bin/vndcompress/offtab.c Sat Jan 25 16:38:15 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: offtab.c,v 1.12 2014/01/25 16:26:17 riastradh Exp $ */
+/* $NetBSD: offtab.c,v 1.13 2014/01/25 16:38:15 riastradh Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: offtab.c,v 1.12 2014/01/25 16:26:17 riastradh Exp $");
+__RCSID("$NetBSD: offtab.c,v 1.13 2014/01/25 16:38:15 riastradh Exp $");
#include <sys/types.h>
#include <sys/endian.h>
@@ -95,11 +95,11 @@ offtab_compute_window_position(struct of
const uint32_t window_size = offtab_compute_window_size(offtab,
window_start);
- __CTASSERT(MAX_WINDOW_SIZE <= (OFF_MAX / sizeof(uint64_t)));
+ __CTASSERT(MAX_WINDOW_SIZE <= (SIZE_MAX / sizeof(uint64_t)));
*bytes = (window_size * sizeof(uint64_t));
assert(window_start <= offtab->ot_n_offsets);
- __CTASSERT(MAX_N_OFFSETS <= (SIZE_MAX / sizeof(uint64_t)));
+ __CTASSERT(MAX_N_OFFSETS <= (OFF_MAX / sizeof(uint64_t)));
const off_t window_offset = ((off_t)window_start *
(off_t)sizeof(uint64_t));