Changeset 7201 in vbox for trunk/src/VBox
- Timestamp:
- Feb 28, 2008 3:33:44 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/string/strformattype.cpp
r7183 r7201 112 112 if (RT_UNLIKELY(!ASMAtomicCmpXchgS32(&g_i32Spinlock, -RTSTRFORMATTYPE_LOCK_OFFSET, 0))) 113 113 { 114 unsigned volatile i; 114 115 AssertFailed(); 115 for ( unsigned volatilei = 0;; i++)116 for (i = 0;; i++) 116 117 if ( !g_i32Spinlock 117 118 && ASMAtomicCmpXchgS32(&g_i32Spinlock, -RTSTRFORMATTYPE_LOCK_OFFSET, 0)) … … 144 145 if (RT_UNLIKELY(ASMAtomicIncS32(&g_i32Spinlock) < 0)) 145 146 { 147 unsigned volatile i; 146 148 AssertFailed(); 147 for ( unsigned volatilei = 0;; i++)149 for (i = 0;; i++) 148 150 if (ASMAtomicUoReadS32(&g_i32Spinlock) > 0) 149 151 break; … … 242 244 RTDECL(int) RTStrFormatTypeRegister(const char *pszType, PFNRTSTRFORMATTYPE pfnHandler, void *pvUser) 243 245 { 246 size_t cchType; 247 int rc; 248 uint32_t cTypes; 244 249 /* 245 250 * Validate input. … … 247 252 AssertPtr(pfnHandler); 248 253 AssertPtr(pszType); 249 c onst size_t cchType = strlen(pszType);254 cchType = strlen(pszType); 250 255 AssertReturn(cchType < RT_SIZEOFMEMB(RTSTRDYNFMT, szType), VERR_INVALID_PARAMETER); 251 256 … … 256 261 257 262 /* check that there are empty slots. */ 258 int rc; 259 uint32_t const cTypes = g_cTypes; 263 cTypes = g_cTypes; 260 264 if (cTypes < RT_ELEMENTS(g_aTypes)) 261 265 { … … 318 322 RTDECL(int) RTStrFormatTypeDeregister(const char *pszType) 319 323 { 324 uint32_t i; 320 325 /* 321 326 * Validate input. … … 327 332 */ 328 333 rtstrFormatTypeWriteLock(); 329 i nt32_t i= rtstrFormatTypeLookup(pszType, strlen(pszType));334 i = rtstrFormatTypeLookup(pszType, strlen(pszType)); 330 335 if (i >= 0) 331 336 {
Note:
See TracChangeset
for help on using the changeset viewer.