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
...@@ -3,11 +3,11 @@ ...@@ -3,11 +3,11 @@
* *
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* and Eclipse Distribution License v1.0 which accompany this distribution. * and Eclipse Distribution License v1.0 which accompany this distribution.
* *
* The Eclipse Public License is available at * The Eclipse Public License is available at
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* and the Eclipse Distribution License is available at * and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php. * http://www.eclipse.org/org/documents/edl-v10.php.
* *
* Contributors: * Contributors:
...@@ -271,7 +271,7 @@ int pstremove(void* handle, char* key) ...@@ -271,7 +271,7 @@ int pstremove(void* handle, char* key)
FUNC_ENTRY; FUNC_ENTRY;
if (clientDir == NULL) if (clientDir == NULL)
{ {
return rc = MQTTCLIENT_PERSISTENCE_ERROR; rc = MQTTCLIENT_PERSISTENCE_ERROR;
goto exit; goto exit;
} }
...@@ -690,7 +690,7 @@ int keysUnix(char *dirname, char ***keys, int *nkeys) ...@@ -690,7 +690,7 @@ int keysUnix(char *dirname, char ***keys, int *nkeys)
while((dir_entry = readdir(dp)) != NULL) while((dir_entry = readdir(dp)) != NULL)
{ {
char* temp = malloc(strlen(dirname)+strlen(dir_entry->d_name)+2); char* temp = malloc(strlen(dirname)+strlen(dir_entry->d_name)+2);
sprintf(temp, "%s/%s", dirname, dir_entry->d_name); sprintf(temp, "%s/%s", dirname, dir_entry->d_name);
if (lstat(temp, &stat_info) == 0 && S_ISREG(stat_info.st_mode)) if (lstat(temp, &stat_info) == 0 && S_ISREG(stat_info.st_mode))
{ {
......
...@@ -998,9 +998,8 @@ char* Socket_getpeer(int sock) ...@@ -998,9 +998,8 @@ char* Socket_getpeer(int sock)
{ {
struct sockaddr_in6 sa; struct sockaddr_in6 sa;
socklen_t sal = sizeof(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); Socket_error("getpeername", sock);
return "unknown"; 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