Changeset 2883 for trunk/kLdr/kLdrHlp.c


Ignore:
Timestamp:
Nov 18, 2006, 12:21:33 PM (19 years ago)
Author:
bird
Message:

cleanup.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kLdr/kLdrHlp.c

    r2881 r2883  
    9696{
    9797#ifdef __OS2__
    98     APIRET rc;
    9998    HMTX hmtx = g_hmtx;
    10099    g_hmtx = NULLHANDLE;
    101     rc = DosCloseMutexSem(hmtx);
    102     if (rc)
    103         return rc;
     100    DosCloseMutexSem(hmtx);
    104101
    105102#elif defined(__WIN__)
     
    267264#ifdef __OS2__
    268265    APIRET      rc;
    269     uintptr_t   offStub;
    270266    ULONG       fFlags = kldrHlpPageProtToNative(enmProt);;
    271267
     
    329325    {
    330326        /* decommit the pages in the stub. */
    331         size_t cbSub = KLDR_MIN(g_cbStub - offStub, cb);
     327        size_t cbStub = KLDR_MIN(g_cbStub - offStub, cb);
    332328        rc = DosSetMem(pv, cbStub, PAG_DECOMMIT);
    333329        if (rc)
    334330        {
    335331            /* Page by page, ignoring errors after the first success. */
    336             while (cbSub > 0)
     332            while (cbStub > 0)
    337333            {
    338334                if (!DosSetMem(pv, 0x1000, PAG_DECOMMIT))
    339335                    rc = 0;
    340336                pv = (void *)((uintptr_t)pv + 0x1000);
    341                 cbSub -= 0x1000;
     337                cbStub -= 0x1000;
    342338                cb -= 0x1000;
    343339            }
     
    350346        else
    351347        {
    352             cb -= cbSub;
     348            cb -= cbStub;
    353349            if (!cb)
    354350                return 0;
    355             pv = (void *)((uintptr_t)pv + cbSub);
     351            pv = (void *)((uintptr_t)pv + cbStub);
    356352        }
    357353    }
     
    403399    if (!rc)
    404400    {
    405         size_t cch = kLdrHlpStrLen(pszValue);
     401        size_t cch = kLdrHlpStrLen((const char *)pszValue);
    406402        if (cchVal > cch)
    407403            kLdrHlpMemCopy(pszVal, pszValue, cch + 1);
     
    592588int kldrHlpIsFilenameOnly(const char *pszFilename)
    593589{
    594     const char *pszLast = NULL;
    595590    for (;;)
    596591    {
Note: See TracChangeset for help on using the changeset viewer.