- Timestamp:
- 23/10/2011 16:51:52 (7 months ago)
- File:
-
- 1 edited
-
box/trunk/lib/backupstore/BackupStoreFile.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
box/trunk/lib/backupstore/BackupStoreFile.h
r2983 r3028 163 163 if(a == 0) return 0; 164 164 // Align to main block size 165 ASSERT(sizeof(u nsigned long) >= sizeof(void*)); // make sure casting the right pointer size165 ASSERT(sizeof(uint64_t) >= sizeof(void*)); // make sure casting the right pointer size 166 166 uint8_t adjustment = BACKUPSTOREFILE_CODING_BLOCKSIZE 167 - (uint8_t)(((unsigned long)a) % BACKUPSTOREFILE_CODING_BLOCKSIZE);167 - (uint8_t)(((uint64_t)a) % BACKUPSTOREFILE_CODING_BLOCKSIZE); 168 168 uint8_t *b = (a + adjustment); 169 169 // Store adjustment … … 175 175 { 176 176 // Check alignment is as expected 177 ASSERT(sizeof(u nsigned long) >= sizeof(void*)); // make sure casting the right pointer size178 ASSERT((uint8_t)(((u nsigned long)Block) % BACKUPSTOREFILE_CODING_BLOCKSIZE) == BACKUPSTOREFILE_CODING_OFFSET);177 ASSERT(sizeof(uint64_t) >= sizeof(void*)); // make sure casting the right pointer size 178 ASSERT((uint8_t)(((uint64_t)Block) % BACKUPSTOREFILE_CODING_BLOCKSIZE) == BACKUPSTOREFILE_CODING_OFFSET); 179 179 uint8_t *a = (uint8_t*)Block; 180 180 a -= BACKUPSTOREFILE_CODING_OFFSET;
Note: See TracChangeset
for help on using the changeset viewer.
