Skip to content
Snippets Groups Projects
Commit de163670 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Some more Coverity shutupness

parent 519f09a5
No related branches found
No related tags found
No related merge requests found
......@@ -575,7 +575,8 @@ connected:
ioctlsocket(sock, FIONBIO, &nonblock);
if (!socket_recvdone(sock, 0)) {
int keepalives = true;
setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE, (void *)&keepalives, sizeof(keepalives));
if (setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE, (void *)&keepalives, sizeof(keepalives)))
fprintf(stderr, "%s:%d: Error %d calling setsockopt()\n", __FILE__, __LINE__, errno);
if (!bbs->hidepopups)
uifc.pop(NULL);
......
......@@ -184,7 +184,8 @@ ssh_connect(struct bbslist *bbs)
}
/* we need to disable Nagle on the socket. */
setsockopt(ssh_sock, IPPROTO_TCP, TCP_NODELAY, (char *)&off, sizeof(off));
if (setsockopt(ssh_sock, IPPROTO_TCP, TCP_NODELAY, (char *)&off, sizeof(off)))
fprintf(stderr, "%s:%d: Error %d calling setsockopt()\n", __FILE__, __LINE__, errno);
SAFECOPY(password, bbs->password);
SAFECOPY(username, bbs->user);
......
......@@ -63,7 +63,8 @@ telnets_connect(struct bbslist *bbs)
}
/* we need to disable Nagle on the socket. */
setsockopt(ssh_sock, IPPROTO_TCP, TCP_NODELAY, (char *)&off, sizeof(off));
if (setsockopt(ssh_sock, IPPROTO_TCP, TCP_NODELAY, (char *)&off, sizeof(off)))
fprintf(stderr, "%s:%d: Error %d calling setsockopt()\n", __FILE__, __LINE__, errno);
if (!bbs->hidepopups)
uifc.pop(NULL);
......
......@@ -2386,8 +2386,10 @@ get_cache_fn_subdir(struct bbslist *bbs, char *fn, size_t fnsz, const char *subd
return ret;
strcat(fn, subdir);
backslash(fn);
if (!isdir(fn))
mkpath(fn);
if (!isdir(fn)) {
if (mkpath(fn))
return 0;
}
if (!isdir(fn))
return 0;
return 1;
......
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