Changeset 2883 for trunk/kLdr/kLdrHlp.c
- Timestamp:
- Nov 18, 2006, 12:21:33 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kLdr/kLdrHlp.c
r2881 r2883 96 96 { 97 97 #ifdef __OS2__ 98 APIRET rc;99 98 HMTX hmtx = g_hmtx; 100 99 g_hmtx = NULLHANDLE; 101 rc = DosCloseMutexSem(hmtx); 102 if (rc) 103 return rc; 100 DosCloseMutexSem(hmtx); 104 101 105 102 #elif defined(__WIN__) … … 267 264 #ifdef __OS2__ 268 265 APIRET rc; 269 uintptr_t offStub;270 266 ULONG fFlags = kldrHlpPageProtToNative(enmProt);; 271 267 … … 329 325 { 330 326 /* decommit the pages in the stub. */ 331 size_t cbS ub = KLDR_MIN(g_cbStub - offStub, cb);327 size_t cbStub = KLDR_MIN(g_cbStub - offStub, cb); 332 328 rc = DosSetMem(pv, cbStub, PAG_DECOMMIT); 333 329 if (rc) 334 330 { 335 331 /* Page by page, ignoring errors after the first success. */ 336 while (cbS ub > 0)332 while (cbStub > 0) 337 333 { 338 334 if (!DosSetMem(pv, 0x1000, PAG_DECOMMIT)) 339 335 rc = 0; 340 336 pv = (void *)((uintptr_t)pv + 0x1000); 341 cbS ub -= 0x1000;337 cbStub -= 0x1000; 342 338 cb -= 0x1000; 343 339 } … … 350 346 else 351 347 { 352 cb -= cbS ub;348 cb -= cbStub; 353 349 if (!cb) 354 350 return 0; 355 pv = (void *)((uintptr_t)pv + cbS ub);351 pv = (void *)((uintptr_t)pv + cbStub); 356 352 } 357 353 } … … 403 399 if (!rc) 404 400 { 405 size_t cch = kLdrHlpStrLen( pszValue);401 size_t cch = kLdrHlpStrLen((const char *)pszValue); 406 402 if (cchVal > cch) 407 403 kLdrHlpMemCopy(pszVal, pszValue, cch + 1); … … 592 588 int kldrHlpIsFilenameOnly(const char *pszFilename) 593 589 { 594 const char *pszLast = NULL;595 590 for (;;) 596 591 {
Note:
See TracChangeset
for help on using the changeset viewer.