From 3de1c4172465451ac4aaf4b4b9a568c76f2e0519 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 14 Jan 2001 21:59:16 +0000 Subject: 2001-01-14 Roland McGrath * encode.c (too_big): New static function. (store_std_leaf_encode): Use it to return EOVERFLOW if a run does not fit in an off_t. --- libstore/encode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libstore') diff --git a/libstore/encode.c b/libstore/encode.c index fd236486..7d119666 100644 --- a/libstore/encode.c +++ b/libstore/encode.c @@ -38,10 +38,10 @@ store_std_leaf_allocate_encoding (const struct store *store, return 0; } -/* The RPC protocol uses 32-bit ints, but store_offset_t is now 64 bits. */ +/* The RPC protocol uses 32-bit off_t's, but store_offset_t is now 64 bits. */ static inline int too_big (store_offset_t ofs) { - int o = (int) ofs; + off_t o = (off_t) ofs; return o < 0 || ((store_offset_t) o != ofs); } -- cgit v1.2.3