Changeset 18425 in vbox for trunk/src/VBox/Runtime/testcase/tstBitOperations.cpp
- Timestamp:
- Mar 28, 2009 1:41:37 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/testcase/tstBitOperations.cpp
r18367 r18425 46 46 47 47 #define NIL_TEST2_ID 0 48 #define TEST2_ID_LAST ( RT_BIT_32(28) - 1>> 8)48 #define TEST2_ID_LAST ((RT_BIT_32(28) - 1) >> 8) 49 49 50 50 struct TestMap2 … … 103 103 104 104 /* Some simple tests first. */ 105 memset(&p2->bmChunkId[0], 0, sizeof(p2->bmChunkId));105 RT_ZERO(p2->bmChunkId); 106 106 RTTEST_CHECK(hTest, ASMBitFirstSet(&p2->bmChunkId[0], TEST2_ID_LAST + 1) == -1); 107 107 for (uint32_t iBit = 0; iBit <= TEST2_ID_LAST; iBit++) … … 115 115 /* The real test. */ 116 116 p2->idChunkPrev = 0; 117 memset(&p2->bmChunkId[0], 0, sizeof(p2->bmChunkId));117 RT_ZERO(p2->bmChunkId); 118 118 ASMBitSet(p2->bmChunkId, NIL_TEST2_ID); 119 119 uint32_t cLeft = TEST2_ID_LAST; … … 165 165 #define GUARD_MAP(p) do { } while (0) 166 166 #define CHECK_GUARD(p) do { } while (0) 167 #define MAP_CLEAR(p) do { memset(p, 0, sizeof(*(p))); GUARD_MAP(p); } while (0)167 #define MAP_CLEAR(p) do { RT_ZERO(*(p)); GUARD_MAP(p); } while (0) 168 168 #define MAP_SET(p) do { memset(p, 0xff, sizeof(*(p))); GUARD_MAP(p); } while (0) 169 169
Note:
See TracChangeset
for help on using the changeset viewer.