Changeset 7615


Ignore:
Timestamp:
Jan 4, 2009, 5:46:27 PM (12 years ago)
Author:
charles
Message:

(trunk libT) remove a small memory leak in the request-list unit test s.t. valgrind will be happy

Location:
trunk/libtransmission
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/request-list-test.c

    r7613 r7615  
    106106    check( !reqListHas( &list, &c ) );
    107107
     108    reqListClear( &list );
    108109    return 0;
    109110}
  • trunk/libtransmission/request-list.c

    r7609 r7615  
    1717
    1818static int
    19 compareRequests( const void * va, const void * vb )
     19compareRequests( const struct peer_request * a,
     20                 const struct peer_request * b )
    2021{
    21     const struct peer_request * a = va;
    22     const struct peer_request * b = vb;
    23 
    2422    if( a->index != b->index )
    2523        return a->index < b->index ? -1 : 1;
     
    6361}
    6462
     63typedef int (*compareFunc)(const void * a, const void * b );
     64
    6565static int
    6666reqListSortPos( const struct request_list * list,
     
    7272                          list->len,
    7373                          sizeof( struct peer_request ),
    74                           compareRequests,
     74                          (compareFunc)compareRequests,
    7575                          exactMatch );
    7676}
Note: See TracChangeset for help on using the changeset viewer.