]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
DEVEL15-salvager-dont-corrupt-dir-lengths-20080812
authorRainer Toebbicke <rtb@pclella.cern.ch>
Thu, 14 Aug 2008 00:44:29 +0000 (00:44 +0000)
committerDerrick Brashear <shadow@dementia.org>
Thu, 14 Aug 2008 00:44:29 +0000 (00:44 +0000)
LICENSE IPL10
FIXES 111585

make the int64 macros work when the "64 bit" number to fill isn't.
use the correct variable type for length in salvager

(cherry picked from commit e5bf9b91eaf8cb930c6cf70419983901907db84d)

src/config/stds.h
src/vol/vol-salvage.c

index 4e5d9d181eab7243df3c859c330bbdb1c1bbc537..62d64db6b233f2d900bf53aa5d7bb2c8698c2a21 100644 (file)
@@ -79,8 +79,8 @@ typedef unsigned long long afs_uint64;
 #define CompareUInt64(a,b) (afs_uint64)(a) - (afs_uint64)(b)
 #define NonZeroInt64(a)                (a)
 #define Int64ToInt32(a)    (a) & MAX_AFS_UINT32
-#define FillInt64(t,h,l) (t) = (h); (t) <<= 32; (t) |= (l);
-#define SplitInt64(t,h,l) (h) = (t) >> 32; (l) = (t) & MAX_AFS_UINT32;
+#define FillInt64(t,h,l) (t) = ((afs_int64)(h) << 32) | (l);
+#define SplitInt64(t,h,l) (h) = ((afs_int64)t) >> 32; (l) = (t) & MAX_AFS_UINT32;
 #define RoundInt64ToInt32(a)    (a > MAX_AFS_UINT32) ? MAX_AFS_UINT32 : a;
 #define RoundInt64ToInt31(a)    (a > MAX_AFS_INT32) ? MAX_AFS_INT32 : a;
 #else /* AFS_64BIT_ENV */
index 8487240cc5d814a6e19c315ddd2396cee39f7235..4e823cdc829597226a69db413c37f7148c293b29 100644 (file)
@@ -2321,7 +2321,7 @@ CopyAndSalvage(register struct DirSummary *dir)
     afs_sfsize_t lcode;
     afs_int32 parentUnique = 1;
     struct VnodeEssence *vnodeEssence;
-    afs_size_t length;
+    afs_fsize_t length;
 
     if (Testing)
        return;