mirror of
https://github.com/curl/curl.git
synced 2026-07-24 15:47:16 +03:00
lib/src: white space edits to comply better with code style
... as checksrc now finds and complains about these. Closes #14921
This commit is contained in:
parent
a57b45c386
commit
fbf5d507ce
128 changed files with 854 additions and 837 deletions
|
|
@ -397,7 +397,7 @@ static int sshkeycallback(struct Curl_easy *easy,
|
|||
(void)clientp;
|
||||
|
||||
/* we only allow perfect matches, and we reject everything else */
|
||||
return (match != CURLKHMATCH_OK)?CURLKHSTAT_REJECT:CURLKHSTAT_FINE;
|
||||
return (match != CURLKHMATCH_OK) ? CURLKHSTAT_REJECT : CURLKHSTAT_FINE;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -534,8 +534,8 @@ static CURLcode ssh_knownhost(struct Curl_easy *data)
|
|||
#ifdef HAVE_LIBSSH2_KNOWNHOST_CHECKP
|
||||
keycheck = libssh2_knownhost_checkp(sshc->kh,
|
||||
conn->host.name,
|
||||
(conn->remote_port != PORT_SSH)?
|
||||
conn->remote_port:-1,
|
||||
(conn->remote_port != PORT_SSH) ?
|
||||
conn->remote_port : -1,
|
||||
remotekey, keylen,
|
||||
LIBSSH2_KNOWNHOST_TYPE_PLAIN|
|
||||
LIBSSH2_KNOWNHOST_KEYENC_RAW|
|
||||
|
|
@ -552,8 +552,8 @@ static CURLcode ssh_knownhost(struct Curl_easy *data)
|
|||
#endif
|
||||
|
||||
infof(data, "SSH host check: %d, key: %s", keycheck,
|
||||
(keycheck <= LIBSSH2_KNOWNHOST_CHECK_MISMATCH)?
|
||||
host->key:"<none>");
|
||||
(keycheck <= LIBSSH2_KNOWNHOST_CHECK_MISMATCH) ?
|
||||
host->key : "<none>");
|
||||
|
||||
/* setup 'knownkey' */
|
||||
if(keycheck <= LIBSSH2_KNOWNHOST_CHECK_MISMATCH) {
|
||||
|
|
@ -2106,7 +2106,7 @@ static CURLcode ssh_statemach_act(struct Curl_easy *data, bool *block)
|
|||
if(sshc->secondCreateDirs) {
|
||||
state(data, SSH_SFTP_CLOSE);
|
||||
sshc->actualcode = sftperr != LIBSSH2_FX_OK ?
|
||||
sftp_libssh2_error_to_CURLE(sftperr):CURLE_SSH;
|
||||
sftp_libssh2_error_to_CURLE(sftperr) : CURLE_SSH;
|
||||
failf(data, "Creating the dir/file failed: %s",
|
||||
sftp_libssh2_strerror(sftperr));
|
||||
break;
|
||||
|
|
@ -2124,7 +2124,7 @@ static CURLcode ssh_statemach_act(struct Curl_easy *data, bool *block)
|
|||
}
|
||||
state(data, SSH_SFTP_CLOSE);
|
||||
sshc->actualcode = sftperr != LIBSSH2_FX_OK ?
|
||||
sftp_libssh2_error_to_CURLE(sftperr):CURLE_SSH;
|
||||
sftp_libssh2_error_to_CURLE(sftperr) : CURLE_SSH;
|
||||
if(!sshc->actualcode) {
|
||||
/* Sometimes, for some reason libssh2_sftp_last_error() returns zero
|
||||
even though libssh2_sftp_open() failed previously! We need to
|
||||
|
|
@ -2134,7 +2134,7 @@ static CURLcode ssh_statemach_act(struct Curl_easy *data, bool *block)
|
|||
}
|
||||
failf(data, "Upload failed: %s (%lu/%d)",
|
||||
sftperr != LIBSSH2_FX_OK ?
|
||||
sftp_libssh2_strerror(sftperr):"ssh error",
|
||||
sftp_libssh2_strerror(sftperr) : "ssh error",
|
||||
sftperr, rc);
|
||||
break;
|
||||
}
|
||||
|
|
@ -3078,8 +3078,8 @@ static void ssh_block2waitfor(struct Curl_easy *data, bool block)
|
|||
dir = libssh2_session_block_directions(sshc->ssh_session);
|
||||
if(dir) {
|
||||
/* translate the libssh2 define bits into our own bit defines */
|
||||
conn->waitfor = ((dir&LIBSSH2_SESSION_BLOCK_INBOUND)?KEEP_RECV:0) |
|
||||
((dir&LIBSSH2_SESSION_BLOCK_OUTBOUND)?KEEP_SEND:0);
|
||||
conn->waitfor = ((dir&LIBSSH2_SESSION_BLOCK_INBOUND) ? KEEP_RECV : 0) |
|
||||
((dir&LIBSSH2_SESSION_BLOCK_OUTBOUND) ? KEEP_SEND : 0);
|
||||
}
|
||||
}
|
||||
if(!dir)
|
||||
|
|
@ -3156,7 +3156,7 @@ static CURLcode ssh_block_statemach(struct Curl_easy *data,
|
|||
fd_write = sock;
|
||||
/* wait for the socket to become ready */
|
||||
(void)Curl_socket_check(fd_read, CURL_SOCKET_BAD, fd_write,
|
||||
left>1000?1000:left);
|
||||
left > 1000 ? 1000 : left);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -256,8 +256,8 @@ static ssize_t wsftp_send(struct Curl_easy *data, int sockindex,
|
|||
(void)sockindex;
|
||||
(void)eos;
|
||||
|
||||
offset[0] = (word32)sshc->offset&0xFFFFFFFF;
|
||||
offset[1] = (word32)(sshc->offset>>32)&0xFFFFFFFF;
|
||||
offset[0] = (word32)sshc->offset & 0xFFFFFFFF;
|
||||
offset[1] = (word32)(sshc->offset >> 32) & 0xFFFFFFFF;
|
||||
|
||||
rc = wolfSSH_SFTP_SendWritePacket(sshc->ssh_session, sshc->handle,
|
||||
sshc->handleSz,
|
||||
|
|
@ -300,8 +300,8 @@ static ssize_t wsftp_recv(struct Curl_easy *data, int sockindex,
|
|||
word32 offset[2];
|
||||
(void)sockindex;
|
||||
|
||||
offset[0] = (word32)sshc->offset&0xFFFFFFFF;
|
||||
offset[1] = (word32)(sshc->offset>>32)&0xFFFFFFFF;
|
||||
offset[0] = (word32)sshc->offset & 0xFFFFFFFF;
|
||||
offset[1] = (word32)(sshc->offset >> 32) & 0xFFFFFFFF;
|
||||
|
||||
rc = wolfSSH_SFTP_SendReadPacket(sshc->ssh_session, sshc->handle,
|
||||
sshc->handleSz,
|
||||
|
|
@ -763,7 +763,7 @@ static CURLcode wssh_statemach_act(struct Curl_easy *data, bool *block)
|
|||
return CURLE_SSH;
|
||||
}
|
||||
|
||||
size = ((curl_off_t)attrs.sz[1] <<32) | attrs.sz[0];
|
||||
size = ((curl_off_t)attrs.sz[1] << 32) | attrs.sz[0];
|
||||
|
||||
data->req.size = size;
|
||||
data->req.maxdownload = size;
|
||||
|
|
@ -1028,7 +1028,7 @@ static CURLcode wssh_block_statemach(struct Curl_easy *data,
|
|||
|
||||
/* wait for the socket to become ready */
|
||||
(void)Curl_socket_check(fd_read, CURL_SOCKET_BAD, fd_write,
|
||||
left>1000?1000:left); /* ignore result */
|
||||
left > 1000 ? 1000 : left); /* ignore result */
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue