Changeset 6224


Ignore:
Timestamp:
Jun 19, 2008, 2:53:57 AM (15 years ago)
Author:
charles
Message:

minor bencode cleanup: (1) remove unused BENC_NULL (2) make tr_bencInit() a private static function in bencode.c

Location:
trunk/libtransmission
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/bencode.c

    r6146 r6224  
    3939#include "utils.h" /* tr_new(), tr_free() */
    4040
    41 const tr_benc BENC_NULL = { 0, { 0 } };
    42 
    4341/**
    4442***
     
    6159    return isContainer(val) || tr_bencIsInt(val) || tr_bencIsString(val);
    6260}
     61
     62static void
     63tr_bencInit( tr_benc * val, int type )
     64{
     65    memset( val, 0, sizeof( *val ) );
     66    val->type = type;
     67}
     68
    6369
    6470/***
  • trunk/libtransmission/bencode.h

    r6162 r6224  
    8080/* convenience functions for building tr_benc    structures */
    8181
    82 static inline void tr_bencInit( tr_benc    * val, int type )
    83 {
    84     memset( val, 0, sizeof( *val ) );
    85     val->type = type;
    86 }
    87 
    8882#define tr_bencInitStr( a, b, c, d ) \
    8983    _tr_bencInitStr( (a), ( char * )(b), (c), (d) )
Note: See TracChangeset for help on using the changeset viewer.