Changeset 8450


Ignore:
Timestamp:
May 20, 2009, 4:30:55 AM (12 years ago)
Author:
charles
Message:

boring tr_memmem tweaks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/utils.c

    r8449 r8450  
    695695    return memmem( haystack, haystacklen, needle, needlelen );
    696696#else
    697     const char *h = haystack;
    698     const char *n = needle;
    699697    size_t i;
    700 
    701698    for( i=0; i<haystacklen-needlelen; ++i )
    702         if( !memcmp( h+i, n, needlelen ) )
    703             return h+i;
    704 
     699        if( !memcmp( haystack+i, needle, needlelen ) )
     700            return haystack+i;
    705701    return NULL;
    706702#endif
Note: See TracChangeset for help on using the changeset viewer.