mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-17 19:11:00 -05:00
Stop using unqualified {GET,PUT}_32BIT.
Those were a reasonable abbreviation when the code almost never had to deal with little-endian numbers, but they've crept into enough places now (e.g. the ECC formatting) that I think I'd now prefer that every use of the integer read/write macros was clearly marked with its endianness. So all uses of GET_??BIT and PUT_??BIT are now qualified. The special versions in x11fwd.c, which used variable endianness because so does the X11 protocol, are suffixed _X11 to make that clear, and where that pushed line lengths over 80 characters I've taken the opportunity to name a local variable to remind me of what that extra parameter actually does.
This commit is contained in:
@ -660,7 +660,7 @@ static int sftp_chan_send(Channel *chan, bool is_stderr,
|
||||
struct sftp_packet *pkt, *reply;
|
||||
|
||||
bufchain_fetch(&sess->subsys_input, lenbuf, 4);
|
||||
pktlen = GET_32BIT(lenbuf);
|
||||
pktlen = GET_32BIT_MSB_FIRST(lenbuf);
|
||||
|
||||
if (bufchain_size(&sess->subsys_input) - 4 < pktlen)
|
||||
break; /* wait for more data */
|
||||
|
Reference in New Issue
Block a user