mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-06-30 19:12:48 -05:00
Add some missing 'const'.
plug_receive(), sftp_senddata() and handle_gotdata() in particular now take const pointers. Also fixed 'char *receive_data' in struct ProxySocket.
This commit is contained in:
@ -45,7 +45,7 @@ typedef struct HandleSocket {
|
||||
Socket sock;
|
||||
} HandleSocket;
|
||||
|
||||
static int handle_gotdata(struct handle *h, void *data, int len)
|
||||
static int handle_gotdata(struct handle *h, const void *data, int len)
|
||||
{
|
||||
HandleSocket *hs = (HandleSocket *)handle_get_privdata(h);
|
||||
|
||||
@ -79,7 +79,7 @@ static int handle_gotdata(struct handle *h, void *data, int len)
|
||||
}
|
||||
}
|
||||
|
||||
static int handle_stderr(struct handle *h, void *data, int len)
|
||||
static int handle_stderr(struct handle *h, const void *data, int len)
|
||||
{
|
||||
HandleSocket *hs = (HandleSocket *)handle_get_privdata(h);
|
||||
|
||||
|
@ -205,7 +205,7 @@ char *do_select(SOCKET skt, bool startup)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int stdin_gotdata(struct handle *h, void *data, int len)
|
||||
int stdin_gotdata(struct handle *h, const void *data, int len)
|
||||
{
|
||||
if (len < 0) {
|
||||
/*
|
||||
|
@ -40,7 +40,7 @@ static void serial_terminate(Serial *serial)
|
||||
}
|
||||
}
|
||||
|
||||
static int serial_gotdata(struct handle *h, void *data, int len)
|
||||
static int serial_gotdata(struct handle *h, const void *data, int len)
|
||||
{
|
||||
Serial *serial = (Serial *)handle_get_privdata(h);
|
||||
if (len <= 0) {
|
||||
|
@ -603,7 +603,7 @@ void init_ucs(Conf *, struct unicode_data *);
|
||||
#define HANDLE_FLAG_IGNOREEOF 2
|
||||
#define HANDLE_FLAG_UNITBUFFER 4
|
||||
struct handle;
|
||||
typedef int (*handle_inputfn_t)(struct handle *h, void *data, int len);
|
||||
typedef int (*handle_inputfn_t)(struct handle *h, const void *data, int len);
|
||||
typedef void (*handle_outputfn_t)(struct handle *h, int new_backlog);
|
||||
struct handle *handle_input_new(HANDLE handle, handle_inputfn_t gotdata,
|
||||
void *privdata, int flags);
|
||||
|
Reference in New Issue
Block a user