From 081c04571b32ff23a0e55ac488cd2908ea3423d8 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sun, 30 Apr 2023 11:23:34 +0000 Subject: [PATCH] tidy-up: avoid word 'simply' Cherry-picked from #1017 --- docs/INSTALL_AUTOTOOLS | 2 +- docs/libssh2_sftp_readdir_ex.3 | 2 +- docs/libssh2_sftp_seek.3 | 4 ++-- docs/libssh2_sftp_seek64.3 | 4 ++-- docs/libssh2_sftp_write.3 | 3 +-- src/transport.c | 2 +- src/userauth.c | 5 ++--- 7 files changed, 10 insertions(+), 12 deletions(-) diff --git a/docs/INSTALL_AUTOTOOLS b/docs/INSTALL_AUTOTOOLS index 607ef079..ce1461a4 100644 --- a/docs/INSTALL_AUTOTOOLS +++ b/docs/INSTALL_AUTOTOOLS @@ -37,7 +37,7 @@ file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' -and enabled with `--cache-file=config.cache' or simply `-C') that saves +and enabled with `--cache-file=config.cache' or shortly `-C') that saves the results of its tests to speed up reconfiguring. (Caching is disabled by default to prevent problems with accidental use of stale cache files.) diff --git a/docs/libssh2_sftp_readdir_ex.3 b/docs/libssh2_sftp_readdir_ex.3 index c655298e..7f553f91 100644 --- a/docs/libssh2_sftp_readdir_ex.3 +++ b/docs/libssh2_sftp_readdir_ex.3 @@ -30,7 +30,7 @@ truncated to fit. \fIlongentry_maxlen\fP bytes to read data into. The format of the `longname' field is unspecified by SFTP protocol. It MUST be suitable for use in the output of a directory listing command (in fact, the recommended operation for -a directory listing command is to simply display this data). +a directory listing command is to display this data). \fIlongentry_maxlen\fP - is the length of longentry in bytes. If the length of the full directory entry is longer than the space provided by diff --git a/docs/libssh2_sftp_seek.3 b/docs/libssh2_sftp_seek.3 index f5d313bf..4a8c3732 100644 --- a/docs/libssh2_sftp_seek.3 +++ b/docs/libssh2_sftp_seek.3 @@ -21,8 +21,8 @@ Deprecated function. Use \fIlibssh2_sftp_seek64(3)\fP instead! Move the file handle's internal pointer to an arbitrary location. Note that libssh2 implements file pointers as a localized concept to make file access appear more POSIX like. No packets are exchanged with the server -during a seek operation. The localized file pointer is simply used as a -convenience offset during read/write operations. +during a seek operation. The localized file pointer is used as a convenience +offset during read/write operations. .SH SEE ALSO .BR libssh2_sftp_open_ex(3), .BR libssh2_sftp_seek64(3) diff --git a/docs/libssh2_sftp_seek64.3 b/docs/libssh2_sftp_seek64.3 index e3f56407..a9c9a35a 100644 --- a/docs/libssh2_sftp_seek64.3 +++ b/docs/libssh2_sftp_seek64.3 @@ -19,8 +19,8 @@ libssh2_sftp_seek64(LIBSSH2_SFTP_HANDLE *handle, Move the file handle's internal pointer to an arbitrary location. libssh2 implements file pointers as a localized concept to make file access appear more POSIX like. No packets are exchanged with the server during a seek -operation. The localized file pointer is simply used as a convenience offset -during read/write operations. +operation. The localized file pointer is used as a convenience offset during +read/write operations. You MUST NOT seek during writing or reading a file with SFTP, as the internals use outstanding packets and changing the "file position" during transit will diff --git a/docs/libssh2_sftp_write.3 b/docs/libssh2_sftp_write.3 index 8b62e941..08a497d6 100644 --- a/docs/libssh2_sftp_write.3 +++ b/docs/libssh2_sftp_write.3 @@ -56,8 +56,7 @@ otherwise block. While LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se. If this function returns 0 (zero) it should not be considered an error, but -simply that there was no error but yet no payload data got sent to the other -end. +that there was no error but yet no payload data got sent to the other end. .SH ERRORS \fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. diff --git a/src/transport.c b/src/transport.c index 4eeceab3..aefd6347 100644 --- a/src/transport.c +++ b/src/transport.c @@ -696,7 +696,7 @@ int _libssh2_transport_read(LIBSSH2_SESSION * session) numbytes -= numdecrypt; } - /* if there are bytes to copy that aren't decrypted, simply + /* if there are bytes to copy that aren't decrypted, copy them as-is to the target buffer */ if(numbytes > 0) { diff --git a/src/userauth.c b/src/userauth.c index 78b511cc..a110ddbc 100644 --- a/src/userauth.c +++ b/src/userauth.c @@ -1475,9 +1475,8 @@ _libssh2_userauth_publickey(LIBSSH2_SESSION *session, session->userauth_pblc_method_len = _libssh2_ntohu32(pubkeydata); if(session->userauth_pblc_method_len > pubkeydata_len - 4) - /* the method length simply cannot be longer than the entire - passed in data, so we use this to detect crazy input - data */ + /* the method length cannot be longer than the entire passed + in data, so we use this to detect crazy input data */ return _libssh2_error(session, LIBSSH2_ERROR_PUBLICKEY_UNVERIFIED, "Invalid public key");