summaryrefslogtreecommitdiff
path: root/lib/vssh/ssh.h
diff options
context:
space:
mode:
authorErik Olsson <erik.eo.olsson@gmail.com>2021-01-16 22:17:51 +0100
committerJay Satiro <raysatiro@yahoo.com>2021-01-20 22:52:34 -0500
commit0a5827571f97feded67d6abc837c332224917f75 (patch)
treece65e4f8137b34233aa9a6287b44fb5a7f9b13dc /lib/vssh/ssh.h
parent46f4736356a436dfb0fd26f41e63f6dd76514f53 (diff)
downloadcurl-0a5827571f97feded67d6abc837c332224917f75.tar.gz
lib: save a bit of space with some structure packing
- Reorder some internal struct members so that less padding is used. This is an attempt at saving a bit of space by packing some structs (using pahole to find the holes) where it might make sense to do so without losing readability. I.e., I tried to avoid separating fields that seem grouped together (like the cwd... fields in struct ftp_conn for instance). Also abstained from touching fields behind conditional macros as that quickly can get complicated. Closes https://github.com/curl/curl/pull/6483
Diffstat (limited to 'lib/vssh/ssh.h')
-rw-r--r--lib/vssh/ssh.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/vssh/ssh.h b/lib/vssh/ssh.h
index 377337031..eab2891ce 100644
--- a/lib/vssh/ssh.h
+++ b/lib/vssh/ssh.h
@@ -123,6 +123,8 @@ struct ssh_conn {
char *rsa_pub; /* path name */
char *rsa; /* path name */
bool authed; /* the connection has been authenticated fine */
+ bool acceptfail; /* used by the SFTP_QUOTE (continue if
+ quote command fails) */
sshstate state; /* always use ssh.c:state() to change state! */
sshstate nextstate; /* the state to goto after stopping */
CURLcode actualcode; /* the actual error code */
@@ -130,8 +132,6 @@ struct ssh_conn {
char *quote_path1; /* two generic pointers for the QUOTE stuff */
char *quote_path2;
- bool acceptfail; /* used by the SFTP_QUOTE (continue if
- quote command fails) */
char *homedir; /* when doing SFTP we figure out home dir in the
connect phase */
char *readdir_line;
@@ -140,9 +140,8 @@ struct ssh_conn {
int secondCreateDirs; /* counter use by the code to see if the
second attempt has been made to change
to/create a directory */
- char *slash_pos; /* used by the SFTP_CREATE_DIRS state */
-
int orig_waitfor; /* default READ/WRITE bits wait for */
+ char *slash_pos; /* used by the SFTP_CREATE_DIRS state */
#if defined(USE_LIBSSH)
char *readdir_linkPath;