mirror of
https://github.com/transmission/transmission.git
synced 2026-05-08 09:39:08 +01:00
(trunk libT) fix small dead code. found by clang static analyzer and reported by d0k
This commit is contained in:
@@ -353,7 +353,7 @@ Boolean
|
||||
tr_utf8_validate( const char * str, int max_len, const char ** end )
|
||||
{
|
||||
const UTF8* source = (const UTF8*) str;
|
||||
const UTF8* sourceEnd = source;
|
||||
const UTF8* sourceEnd;
|
||||
|
||||
if( max_len == 0 )
|
||||
return true;
|
||||
|
||||
@@ -530,7 +530,6 @@ tr_netBindTCP( const tr_address * addr, tr_port port, tr_bool suppressMsgs )
|
||||
struct sockaddr_storage sock;
|
||||
const int type = SOCK_STREAM;
|
||||
int addrlen;
|
||||
int retval;
|
||||
|
||||
#if defined( SO_REUSEADDR ) || defined( SO_REUSEPORT ) || defined( IPV6_V6ONLY )
|
||||
int optval = 1;
|
||||
@@ -548,8 +547,8 @@ tr_netBindTCP( const tr_address * addr, tr_port port, tr_bool suppressMsgs )
|
||||
|
||||
#ifdef IPV6_V6ONLY
|
||||
if( addr->type == TR_AF_INET6 &&
|
||||
( retval = setsockopt( s, IPPROTO_IPV6, IPV6_V6ONLY, &optval,
|
||||
sizeof( optval ) ) ) == -1 ) {
|
||||
setsockopt( s, IPPROTO_IPV6, IPV6_V6ONLY, &optval,
|
||||
sizeof( optval ) ) == -1 ) {
|
||||
/* the kernel may not support this. if not, ignore it */
|
||||
if( errno != ENOPROTOOPT )
|
||||
return -errno;
|
||||
|
||||
@@ -84,7 +84,7 @@ struct tr_web
|
||||
static struct tr_web_sockinfo *
|
||||
getSockinfo( tr_web * web, int fd, tr_bool createIfMissing )
|
||||
{
|
||||
tr_list * l = web->fds;
|
||||
tr_list * l;
|
||||
|
||||
for( l=web->fds; l!=NULL; l=l->next ) {
|
||||
struct tr_web_sockinfo * s = l->data;
|
||||
|
||||
Reference in New Issue
Block a user