Don't use uninitialized variables.

This commit is contained in:
Josh Elsasser 2007-04-18 16:41:37 +00:00
parent 132e4f5c8c
commit 6f1c25a22e
2 changed files with 5 additions and 4 deletions

View File

@ -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;
}

View File

@ -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 * ) ) )
{