Changeset 11714


Ignore:
Timestamp:
Jan 19, 2011, 6:14:01 PM (11 years ago)
Author:
jordan
Message:

(trunk) #3914 "strlsize() passes variable of incompatible type to the tr_formatter_size_B()" -- fixed.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/daemon/remote.c

    r11709 r11714  
    173173strlsize( char * buf, int64_t bytes, size_t buflen )
    174174{
    175     if( !bytes )
     175    if( bytes < 1 )
     176        tr_strlcpy( buf, "Unknown", buflen );
     177    else if( !bytes )
    176178        tr_strlcpy( buf, "None", buflen );
    177179    else
  • trunk/libtransmission/utils.c

    r11709 r11714  
    16601660{
    16611661    char * name;
    1662     uint64_t value;
     1662    int64_t value;
    16631663};
    16641664
     
    16951695static char*
    16961696formatter_get_size_str( const struct formatter_units * u,
    1697                         char * buf, uint64_t bytes, size_t buflen )
     1697                        char * buf, int64_t bytes, size_t buflen )
    16981698{
    16991699    int precision;
     
    17301730
    17311731char*
    1732 tr_formatter_size_B( char * buf, uint64_t bytes, size_t buflen )
     1732tr_formatter_size_B( char * buf, int64_t bytes, size_t buflen )
    17331733{
    17341734    return formatter_get_size_str( &size_units, buf, bytes, buflen );
     
    17851785
    17861786char*
    1787 tr_formatter_mem_B( char * buf, uint64_t bytes_per_second, size_t buflen )
     1787tr_formatter_mem_B( char * buf, int64_t bytes_per_second, size_t buflen )
    17881788{
    17891789    return formatter_get_size_str( &mem_units, buf, bytes_per_second, buflen );
  • trunk/libtransmission/utils.h

    r11709 r11714  
    586586
    587587/* format a memory size from bytes into a user-readable string. */
    588 char* tr_formatter_mem_B( char * buf, uint64_t bytes, size_t buflen );
     588char* tr_formatter_mem_B( char * buf, int64_t bytes, size_t buflen );
    589589
    590590/* format a memory size from MB into a user-readable string. */
     
    592592
    593593/* format a file size from bytes into a user-readable string. */
    594 char* tr_formatter_size_B( char * buf, uint64_t bytes, size_t buflen );
     594char* tr_formatter_size_B( char * buf, int64_t bytes, size_t buflen );
    595595
    596596void tr_formatter_get_units( struct tr_benc * dict );
Note: See TracChangeset for help on using the changeset viewer.