mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-16 02:27:32 -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:
14
scpserver.c
14
scpserver.c
@ -481,7 +481,7 @@ static void scp_source_push_name(
|
||||
}
|
||||
|
||||
static void scp_source_free(ScpServer *s);
|
||||
static int scp_source_send(ScpServer *s, const void *data, size_t length);
|
||||
static size_t scp_source_send(ScpServer *s, const void *data, size_t length);
|
||||
static void scp_source_eof(ScpServer *s);
|
||||
static void scp_source_throttle(ScpServer *s, bool throttled);
|
||||
|
||||
@ -859,7 +859,7 @@ static void scp_source_process_stack(ScpSource *scp)
|
||||
scp_requeue(scp);
|
||||
}
|
||||
|
||||
static int scp_source_send(ScpServer *s, const void *vdata, size_t length)
|
||||
static size_t scp_source_send(ScpServer *s, const void *vdata, size_t length)
|
||||
{
|
||||
ScpSource *scp = container_of(s, ScpSource, scpserver);
|
||||
const char *data = (const char *)vdata;
|
||||
@ -994,7 +994,7 @@ static void scp_sink_pop(ScpSink *scp)
|
||||
}
|
||||
|
||||
static void scp_sink_free(ScpServer *s);
|
||||
static int scp_sink_send(ScpServer *s, const void *data, size_t length);
|
||||
static size_t scp_sink_send(ScpServer *s, const void *data, size_t length);
|
||||
static void scp_sink_eof(ScpServer *s);
|
||||
static void scp_sink_throttle(ScpServer *s, bool throttled) {}
|
||||
|
||||
@ -1078,7 +1078,7 @@ static void scp_sink_coroutine(ScpSink *scp)
|
||||
goto done;
|
||||
|
||||
void *vdata;
|
||||
int len;
|
||||
size_t len;
|
||||
const char *cdata, *newline;
|
||||
|
||||
bufchain_prefix(&scp->data, &vdata, &len);
|
||||
@ -1180,7 +1180,7 @@ static void scp_sink_coroutine(ScpSink *scp)
|
||||
scp->file_offset = 0;
|
||||
while (scp->file_offset < scp->file_size) {
|
||||
void *vdata;
|
||||
int len;
|
||||
size_t len;
|
||||
uint64_t this_len, remaining;
|
||||
|
||||
crMaybeWaitUntilV(
|
||||
@ -1258,7 +1258,7 @@ static void scp_sink_coroutine(ScpSink *scp)
|
||||
crFinishV;
|
||||
}
|
||||
|
||||
static int scp_sink_send(ScpServer *s, const void *data, size_t length)
|
||||
static size_t scp_sink_send(ScpServer *s, const void *data, size_t length)
|
||||
{
|
||||
ScpSink *scp = container_of(s, ScpSink, scpserver);
|
||||
|
||||
@ -1292,7 +1292,7 @@ struct ScpError {
|
||||
|
||||
static void scp_error_free(ScpServer *s);
|
||||
|
||||
static int scp_error_send(ScpServer *s, const void *data, size_t length)
|
||||
static size_t scp_error_send(ScpServer *s, const void *data, size_t length)
|
||||
{ return 0; }
|
||||
static void scp_error_eof(ScpServer *s) {}
|
||||
static void scp_error_throttle(ScpServer *s, bool throttled) {}
|
||||
|
Reference in New Issue
Block a user