]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE12-int64-operator-updates-20020821
authorHartmut Reuter <reuter@rzg.mpg.de>
Wed, 21 Aug 2002 21:59:04 +0000 (21:59 +0000)
committerDerrick Brashear <shadow@dementia.org>
Wed, 21 Aug 2002 21:59:04 +0000 (21:59 +0000)
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

index b55170eb7cd05fc62e37bac67ccb965a9b59a4a9..435a79dfa651302d3bff4eace94969a1d53f38d2 100644 (file)
@@ -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);