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

Some more Coverity shutupness

parent cd6e64e8
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #4476 passed
...@@ -575,7 +575,8 @@ connected: ...@@ -575,7 +575,8 @@ connected:
ioctlsocket(sock, FIONBIO, &nonblock); ioctlsocket(sock, FIONBIO, &nonblock);
if (!socket_recvdone(sock, 0)) { if (!socket_recvdone(sock, 0)) {
int keepalives = true; 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) if (!bbs->hidepopups)
uifc.pop(NULL); uifc.pop(NULL);
......
...@@ -184,7 +184,8 @@ ssh_connect(struct bbslist *bbs) ...@@ -184,7 +184,8 @@ ssh_connect(struct bbslist *bbs)
} }
/* we need to disable Nagle on the socket. */ /* 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(password, bbs->password);
SAFECOPY(username, bbs->user); SAFECOPY(username, bbs->user);
......
...@@ -63,7 +63,8 @@ telnets_connect(struct bbslist *bbs) ...@@ -63,7 +63,8 @@ telnets_connect(struct bbslist *bbs)
} }
/* we need to disable Nagle on the socket. */ /* 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) if (!bbs->hidepopups)
uifc.pop(NULL); uifc.pop(NULL);
......
...@@ -2386,8 +2386,10 @@ get_cache_fn_subdir(struct bbslist *bbs, char *fn, size_t fnsz, const char *subd ...@@ -2386,8 +2386,10 @@ get_cache_fn_subdir(struct bbslist *bbs, char *fn, size_t fnsz, const char *subd
return ret; return ret;
strcat(fn, subdir); strcat(fn, subdir);
backslash(fn); backslash(fn);
if (!isdir(fn)) if (!isdir(fn)) {
mkpath(fn); if (mkpath(fn))
return 0;
}
if (!isdir(fn)) if (!isdir(fn))
return 0; return 0;
return 1; return 1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment