mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-06 14:02:47 -05:00
Make lots of generic data parameters into 'void *'.
This is a cleanup I started to notice a need for during the BinarySink work. It removes a lot of faffing about casting things to char * or unsigned char * so that some API will accept them, even though lots of such APIs really take a plain 'block of raw binary data' argument and don't care what C thinks the signedness of that data might be - they may well reinterpret it back and forth internally. So I've tried to arrange for all the function call APIs that ought to have a void * (or const void *) to have one, and those that need to do pointer arithmetic on the parameter internally can cast it back at the top of the function. That saves endless ad-hoc casts at the call sites.
This commit is contained in:
@ -509,8 +509,8 @@ static void sk_tcp_flush(Socket s)
|
||||
}
|
||||
|
||||
static void sk_tcp_close(Socket s);
|
||||
static int sk_tcp_write(Socket s, const char *data, int len);
|
||||
static int sk_tcp_write_oob(Socket s, const char *data, int len);
|
||||
static int sk_tcp_write(Socket s, const void *data, int len);
|
||||
static int sk_tcp_write_oob(Socket s, const void *data, int len);
|
||||
static void sk_tcp_write_eof(Socket s);
|
||||
static void sk_tcp_set_frozen(Socket s, int is_frozen);
|
||||
static char *sk_tcp_peer_info(Socket s);
|
||||
@ -1189,7 +1189,7 @@ void try_send(Actual_Socket s)
|
||||
uxsel_tell(s);
|
||||
}
|
||||
|
||||
static int sk_tcp_write(Socket sock, const char *buf, int len)
|
||||
static int sk_tcp_write(Socket sock, const void *buf, int len)
|
||||
{
|
||||
Actual_Socket s = (Actual_Socket) sock;
|
||||
|
||||
@ -1215,7 +1215,7 @@ static int sk_tcp_write(Socket sock, const char *buf, int len)
|
||||
return bufchain_size(&s->output_data);
|
||||
}
|
||||
|
||||
static int sk_tcp_write_oob(Socket sock, const char *buf, int len)
|
||||
static int sk_tcp_write_oob(Socket sock, const void *buf, int len)
|
||||
{
|
||||
Actual_Socket s = (Actual_Socket) sock;
|
||||
|
||||
|
Reference in New Issue
Block a user