mirror of
https://github.com/transmission/transmission
synced 2024-12-26 01:27:28 +00:00
minor bencode cleanup: (1) remove unused BENC_NULL (2) make tr_bencInit() a private static function in bencode.c
This commit is contained in:
parent
e16279d0f4
commit
8dd3e46450
2 changed files with 8 additions and 8 deletions
|
@ -38,8 +38,6 @@
|
|||
#include "ptrarray.h"
|
||||
#include "utils.h" /* tr_new(), tr_free() */
|
||||
|
||||
const tr_benc BENC_NULL = { 0, { 0 } };
|
||||
|
||||
/**
|
||||
***
|
||||
**/
|
||||
|
@ -61,6 +59,14 @@ isSomething( const tr_benc * val )
|
|||
return isContainer(val) || tr_bencIsInt(val) || tr_bencIsString(val);
|
||||
}
|
||||
|
||||
static void
|
||||
tr_bencInit( tr_benc * val, int type )
|
||||
{
|
||||
memset( val, 0, sizeof( *val ) );
|
||||
val->type = type;
|
||||
}
|
||||
|
||||
|
||||
/***
|
||||
**** tr_bencParse()
|
||||
**** tr_bencLoad()
|
||||
|
|
|
@ -79,12 +79,6 @@ tr_benc * tr_bencDictFindFirst( tr_benc * dict, ... );
|
|||
|
||||
/* convenience functions for building tr_benc structures */
|
||||
|
||||
static inline void tr_bencInit( tr_benc * val, int type )
|
||||
{
|
||||
memset( val, 0, sizeof( *val ) );
|
||||
val->type = type;
|
||||
}
|
||||
|
||||
#define tr_bencInitStr( a, b, c, d ) \
|
||||
_tr_bencInitStr( (a), ( char * )(b), (c), (d) )
|
||||
void _tr_bencInitStr( tr_benc * val, char * str, int len, int nofree );
|
||||
|
|
Loading…
Reference in a new issue