mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-18 11:31:00 -05:00
Make lots of 'int' length fields into size_t.
This is a general cleanup which has been overdue for some time: lots of length fields are now the machine word type rather than the (in practice) fixed 'int'.
This commit is contained in:
@ -59,11 +59,10 @@ void backend_socket_log(Seat *seat, LogContext *logctx,
|
||||
}
|
||||
}
|
||||
|
||||
void log_proxy_stderr(Plug *plug, bufchain *buf, const void *vdata, int len)
|
||||
void log_proxy_stderr(Plug *plug, bufchain *buf, const void *vdata, size_t len)
|
||||
{
|
||||
const char *data = (const char *)vdata;
|
||||
int pos = 0;
|
||||
int msglen;
|
||||
size_t pos = 0;
|
||||
const char *nlpos;
|
||||
char *msg, *fullmsg;
|
||||
|
||||
@ -88,7 +87,8 @@ void log_proxy_stderr(Plug *plug, bufchain *buf, const void *vdata, int len)
|
||||
/*
|
||||
* Collect the resulting line of data and pass it to plug_log.
|
||||
*/
|
||||
msglen = bufchain_size(buf);
|
||||
size_t msglen = bufchain_size(buf);
|
||||
assert(msglen < ~(size_t)0);
|
||||
msg = snewn(msglen+1, char);
|
||||
bufchain_fetch(buf, msg, msglen);
|
||||
bufchain_consume(buf, msglen);
|
||||
|
Reference in New Issue
Block a user