From 9900745de6f253f4f06c62b329cd6f0a77fc011c Mon Sep 17 00:00:00 2001 From: Hartmut Reuter Date: Wed, 21 Aug 2002 21:59:04 +0000 Subject: [PATCH] STABLE12-int64-operator-updates-20020821 Changing the length and offset fields from afs_int64 to afs_uint64 gave strange results for CompareInt64 and SubtractInt64. Therefore it's better to cast the values as signed in these macros. (cherry picked from commit 6587d225213c9125cb8bfb227647fc5e5511b134) --- src/config/stds.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config/stds.h b/src/config/stds.h index b55170eb7..435a79dfa 100644 --- a/src/config/stds.h +++ b/src/config/stds.h @@ -54,8 +54,8 @@ typedef unsigned long long afs_uint64; #define ZeroInt64(a) (a) = 0 #define AssignInt64(a, b) *(a) = (b) #define AddInt64(a,b,c) *(c) = (a) + (b) -#define SubtractInt64(a,b,c) *(c) = (a) - (b) -#define CompareInt64(a,b) (a) - (b) +#define SubtractInt64(a,b,c) *(c) = (afs_int64)(a) - (afs_int64)(b) +#define CompareInt64(a,b) (afs_int64)(a) - (afs_int64)(b) #define NonZeroInt64(a) (a) #define Int64ToInt32(a) (a) & 0xFFFFFFFFL #define FillInt64(t,h,l) (t) = (h); (t) <<= 32; (t) |= (l); -- 2.39.5