mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-11 00:03:45 -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:
@ -137,14 +137,14 @@ static void sk_handle_close(Socket s)
|
||||
sfree(ps);
|
||||
}
|
||||
|
||||
static int sk_handle_write(Socket s, const char *data, int len)
|
||||
static int sk_handle_write(Socket s, const void *data, int len)
|
||||
{
|
||||
Handle_Socket ps = (Handle_Socket) s;
|
||||
|
||||
return handle_write(ps->send_h, data, len);
|
||||
}
|
||||
|
||||
static int sk_handle_write_oob(Socket s, const char *data, int len)
|
||||
static int sk_handle_write_oob(Socket s, const void *data, int len)
|
||||
{
|
||||
/*
|
||||
* oob data is treated as inband; nasty, but nothing really
|
||||
|
Reference in New Issue
Block a user