Closed Fojtik closed 5 years ago
function ftplib::Connect - Current code uses a variable ret in only one branch.
#if defined(_WIN32) if((sin.sin_addr.s_addr = inet_addr(lhost)) == -1) #else ret = inet_aton(lhost, &sin.sin_addr); if(ret == 0) #endif
Proposed fix No1 - variable ret is completelly useles and so it can be elliminated anyway:
#if defined(_WIN32) if((sin.sin_addr.s_addr = inet_addr(lhost)) == -1) #else if(inet_aton(lhost, &sin.sin_addr) == 0) #endif
Proposed alternative fix No2 - declare variable ret in one branch:
#if defined(_WIN32) if((sin.sin_addr.s_addr = inet_addr(lhost)) == -1) #else int ret = inet_aton(lhost, &sin.sin_addr); if(ret == 0) #endif
thx incorporated those
function ftplib::Connect - Current code uses a variable ret in only one branch.
Proposed fix No1 - variable ret is completelly useles and so it can be elliminated anyway:
Proposed alternative fix No2 - declare variable ret in one branch: