git://git.openafs.org
/
openafs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
f256e25
)
int64-operator-updates-20020821
author
Hartmut Reuter
<reuter@rzg.mpg.de>
Wed, 21 Aug 2002 21:57:35 +0000 (21:57 +0000)
committer
Derrick Brashear
<shadow@dementia.org>
Wed, 21 Aug 2002 21:57:35 +0000 (21:57 +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.
src/config/stds.h
patch
|
blob
|
history
diff --git
a/src/config/stds.h
b/src/config/stds.h
index
7f815c4
..
73c766f
100644
(file)
--- 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);