mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-14 09:37:34 -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:
5
x11fwd.c
5
x11fwd.c
@ -787,7 +787,7 @@ static void x11_send_init_error(struct X11Connection *xconn,
|
||||
PUT_16BIT(xconn->firstpkt[0], reply + 6, msgsize >> 2);/* data len */
|
||||
memset(reply + 8, 0, msgsize);
|
||||
memcpy(reply + 8, full_message, msglen);
|
||||
sshfwd_write(xconn->c, (char *)reply, 8 + msgsize);
|
||||
sshfwd_write(xconn->c, reply, 8 + msgsize);
|
||||
sshfwd_write_eof(xconn->c);
|
||||
xconn->no_data_sent_to_x_client = FALSE;
|
||||
sfree(reply);
|
||||
@ -1057,8 +1057,7 @@ void *x11_make_greeting(int endian, int protomajor, int protominor,
|
||||
t = time(NULL);
|
||||
PUT_32BIT_MSB_FIRST(realauthdata+14, t);
|
||||
|
||||
des_encrypt_xdmauth((const unsigned char *)auth_data + 9,
|
||||
realauthdata, authdatalen);
|
||||
des_encrypt_xdmauth(auth_data + 9, realauthdata, authdatalen);
|
||||
} else {
|
||||
authdata = realauthdata;
|
||||
authdatalen = 0;
|
||||
|
Reference in New Issue
Block a user