Skip to content
Snippets Groups Projects
Commit 4d0df756 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Remove unnecessary NULL-ptr compares caught by Coverity

parent 5e7699f9
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
......@@ -587,7 +587,7 @@ static int sockgetrsp_opt(SOCKET socket, const char* prot, CRYPT_SESSION sess, c
lprintf(LOG_DEBUG,"%04d %s RX: %s",socket, prot, buf);
continue;
}
if(rsp!=NULL && strnicmp(buf,rsp,strlen(rsp))) {
if(strnicmp(buf,rsp,strlen(rsp))) {
lprintf(LOG_WARNING,"%04d %s !INVALID RESPONSE: '%s' Expected: '%s'", socket, prot, buf, rsp);
free(mopt);
return(-1);
......
......@@ -354,10 +354,10 @@ void status_client_on(enum sbbs_status_service svc, BOOL on, SOCKET sock, client
pthread_mutex_lock(&status_mutex[svc]);
if(on) {
prot = client->protocol;
if (client == NULL || prot == NULL)
if (prot == NULL)
prot = "<null>";
user = client->user;
if (client == NULL || user == NULL)
if (user == NULL)
user = "<null>";
if(update) {
list_node_t* node;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment