Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mRemoteNG/PuTTYNG.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2018-05-26 10:31:34 +0300
committerSimon Tatham <anakin@pobox.com>2018-05-26 11:22:43 +0300
commit7babe66a839fecfe5d8b3db901b06d2fb7672cfc (patch)
tree2e46a083ec156c12ae11504214dc8c157afd962f /contrib
parent2fc29577dfb9c10c6349dca692d0f1026d4c5779 (diff)
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.
Diffstat (limited to 'contrib')
-rw-r--r--contrib/cygtermd/telnet.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/cygtermd/telnet.c b/contrib/cygtermd/telnet.c
index 08487374..ce0bc5fb 100644
--- a/contrib/cygtermd/telnet.c
+++ b/contrib/cygtermd/telnet.c
@@ -210,7 +210,7 @@ static void send_opt(Telnet telnet, int cmd, int option)
b[0] = IAC;
b[1] = cmd;
b[2] = option;
- sel_write(telnet->net, (char *)b, 3);
+ sel_write(telnet->net, b, 3);
}
static void deactivate_option(Telnet telnet, const struct Opt *o)
@@ -554,10 +554,10 @@ void telnet_from_pty(Telnet telnet, char *buf, int len)
while (p < end && iswritable(*p))
p++;
- sel_write(telnet->net, (char *)q, p - q);
+ sel_write(telnet->net, q, p - q);
while (p < end && !iswritable(*p)) {
- sel_write(telnet->net, (char *)(*p == IAC ? iac : cr), 2);
+ sel_write(telnet->net, *p == IAC ? iac : cr, 2);
p++;
}
}