Commit 92824a94 authored by Ian Craggs's avatar Ian Craggs

Fix some static analysis "problems"

Bug:375532
parent 0206989e
......@@ -662,7 +662,8 @@ int keysUnix(char *dirname, char ***keys, int *nkeys)
goto exit;
}
if (nfkeys != 0 )
if (nfkeys != 0)
{
fkeys = (char **)malloc(nfkeys * sizeof(char *));
/* copy the keys */
......@@ -691,6 +692,7 @@ int keysUnix(char *dirname, char ***keys, int *nkeys)
rc = MQTTCLIENT_PERSISTENCE_ERROR;
goto exit;
}
}
*nkeys = nfkeys;
*keys = fkeys;
......
......@@ -616,6 +616,9 @@ int Socket_new(char* addr, int port, int* sock)
res = res->ai_next;
}
if (result == NULL)
rc = -1;
else
#if defined(AF_INET6)
if (result->ai_family == AF_INET6)
{
......
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