Unverified Commit e9bd6a4f authored by Ian Craggs's avatar Ian Craggs Committed by GitHub

Merge pull request #502 from AdrianMoranMontes/dev

Remove unused return code on Socket_getpeer function and unreachable statement.
parents d81f1cc1 8445c44a
......@@ -271,7 +271,7 @@ int pstremove(void* handle, char* key)
FUNC_ENTRY;
if (clientDir == NULL)
{
return rc = MQTTCLIENT_PERSISTENCE_ERROR;
rc = MQTTCLIENT_PERSISTENCE_ERROR;
goto exit;
}
......
......@@ -998,9 +998,8 @@ char* Socket_getpeer(int sock)
{
struct sockaddr_in6 sa;
socklen_t sal = sizeof(sa);
int rc;
if ((rc = getpeername(sock, (struct sockaddr*)&sa, &sal)) == SOCKET_ERROR)
if (getpeername(sock, (struct sockaddr*)&sa, &sal) == SOCKET_ERROR)
{
Socket_error("getpeername", sock);
return "unknown";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment