diff options
| author | Jon Simons <jon@jonsimons.org> | 2014-02-06 12:37:02 -0800 |
|---|---|---|
| committer | Andreas Schneider <asn@cryptomilk.org> | 2014-03-27 11:19:50 +0100 |
| commit | aa05248ca81e3bd9e949ad724d45518707446e2c (patch) | |
| tree | 2d9267ee49eb22d84d4af8a1ad0eda9441299f15 /include/libssh | |
| parent | 04543c9dbc2e7fb3d43985cd913a0b1225be43d5 (diff) | |
| download | libssh-aa05248ca81e3bd9e949ad724d45518707446e2c.tar.gz libssh-aa05248ca81e3bd9e949ad724d45518707446e2c.tar.xz libssh-aa05248ca81e3bd9e949ad724d45518707446e2c.zip | |
packet: elide two buffer_prepend calls into one
In packet_send2, rather than issue two separate buffer_prepend_data calls
(each of which may entail realloc + memmove + memcpy), elide the prepend
work into a single buffer_prepend_data: the header information is computed
locally, and a single 5 byte prepend operation is now done instead of
prepending 1, then 4 bytes.
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'include/libssh')
0 files changed, 0 insertions, 0 deletions
