mirror of
https://github.com/transmission/transmission
synced 2024-12-23 16:24:02 +00:00
Don't use uninitialized variables.
This commit is contained in:
parent
132e4f5c8c
commit
6f1c25a22e
2 changed files with 5 additions and 4 deletions
|
@ -876,7 +876,7 @@ infomsg( enum ipc_msg msgid, benc_val_t * list, int64_t tag,
|
|||
|
||||
assert( IPC_MSG_INFO == msgid );
|
||||
|
||||
if( TYPE_LIST != list->type || NULL == resp->infocb )
|
||||
if( TYPE_LIST != list->type )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -884,7 +884,7 @@ infomsg( enum ipc_msg msgid, benc_val_t * list, int64_t tag,
|
|||
bzero( &key, sizeof key );
|
||||
key.tag = tag;
|
||||
resp = RB_FIND( resptree, &gl_resps, &key );
|
||||
if( NULL == resp )
|
||||
if( NULL == resp || NULL == resp->infocb )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -928,7 +928,7 @@ statmsg( enum ipc_msg msgid, benc_val_t * list, int64_t tag,
|
|||
|
||||
assert( IPC_MSG_STAT == msgid );
|
||||
|
||||
if( TYPE_LIST != list->type || NULL == resp->statcb )
|
||||
if( TYPE_LIST != list->type )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -936,7 +936,7 @@ statmsg( enum ipc_msg msgid, benc_val_t * list, int64_t tag,
|
|||
bzero( &key, sizeof key );
|
||||
key.tag = tag;
|
||||
resp = RB_FIND( resptree, &gl_resps, &key );
|
||||
if( NULL == resp )
|
||||
if( NULL == resp || NULL == resp->statcb )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -291,6 +291,7 @@ benc_val_t * tr_bencDictFindFirst( benc_val_t * val, ... )
|
|||
benc_val_t * ret;
|
||||
va_list ap;
|
||||
|
||||
ret = NULL;
|
||||
va_start( ap, val );
|
||||
while( ( key = va_arg( ap, const char * ) ) )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue