Ignore:
Timestamp:
Oct 18, 2011, 8:31:19 PM (14 years ago)
Author:
dmik
Message:

Declare index var used outside for().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/gcc-kmk/src/kernel32/heapshared.cpp

    r21302 r21714  
    88 *
    99 * TODO: Not process/thread safe (initializing/destroying heap)
    10  * 
     10 *
    1111 * ASSUMPTION: Rtl library takes care of protection of heap increase/decrease
    1212 *             (from multiple threads/processes)
     
    158158    dprintf(("KERNEL32: GetPageRangeFree(%08xh)", pageoffset));
    159159
    160     for(int i=pageoffset;i<MAX_HEAPPAGES;i++) {
     160    int i;
     161    for(i=pageoffset;i<MAX_HEAPPAGES;i++) {
    161162        if(pageBitmap[i] == 1) {
    162163                    break;
     
    184185    {
    185186        int nrpagesfree = GetPageRangeFree(i);
    186         if(nrpagesfree >= *size/PAGE_SIZE) 
     187        if(nrpagesfree >= *size/PAGE_SIZE)
    187188        {
    188189                    newblock = (PVOID)((ULONG)pSharedMem + i*PAGE_SIZE);
Note: See TracChangeset for help on using the changeset viewer.