VirtualBox

Changeset 1087 in kBuild


Ignore:
Timestamp:
Aug 29, 2007 12:40:58 PM (17 years ago)
Author:
bird
Message:

When matching the current line, the newline must be included or we might end up spinning for ever if the 2nd line is a subset of the 1st. Part of the blame here is also on the buffer realignment, which would cause us to be stuck on the same line.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kObjCache/kObjCache.c

    r1055 r1087  
    25312531            /* Match the current line. */
    25322532            psz = memchr(psz1, '\n', pszEnd1 - psz1);
    2533             if (!psz)
     2533            if (!psz++)
    25342534                psz = pszEnd1;
    25352535            cch = psz - psz1;
     
    25592559            }
    25602560
    2561             /* Try align psz1 on 8 or 4 bytes so at least one of the buffers are aligned. */
     2561            /* Advance. We might now have a misaligned buffer, but that's memcmps problem... */
    25622562            psz1 += cch;
    25632563            psz2 += cch;
    2564             if (cch >= ((uintptr_t)psz1 & 7))
    2565             {
    2566                 psz2 -= ((uintptr_t)psz1 & 7);
    2567                 psz1 -= ((uintptr_t)psz1 & 7);
    2568             }
    2569             else if (cch >= ((uintptr_t)psz1 & 3))
    2570             {
    2571                 psz2 -= ((uintptr_t)psz1 & 3);
    2572                 psz1 -= ((uintptr_t)psz1 & 3);
    2573             }
    25742564        }
    25752565    }
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette