From 566d4826f4115006b2bfaf5210649a7935cb3c00 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Wed, 12 Sep 2018 08:55:39 +0100 Subject: [PATCH] testback.c: add some missing 'const'. This source file isn't actually built as part of even a test binary, so it hasn't been kept up to date with internal API changes. But it might still come in useful in the future (I think its original purpose was to substitute for a normal backend in order to test the GUI side of a new PuTTY port before the network side was written), so I'll at least try to carry on keeping it updated. --- testback.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/testback.c b/testback.c index 752ec4ca..a84caee0 100644 --- a/testback.c +++ b/testback.c @@ -32,15 +32,15 @@ #include "putty.h" -static const char *null_init(void *, void **, Conf *, char *, int, char **, - int, int); -static const char *loop_init(void *, void **, Conf *, char *, int, char **, - int, int); +static const char *null_init(void *, void **, Conf *, const char *, int, + char **, int, int); +static const char *loop_init(void *, void **, Conf *, const char *, int, + char **, int, int); static void null_free(void *); static void loop_free(void *); static void null_reconfig(void *, Conf *); -static int null_send(void *, char *, int); -static int loop_send(void *, char *, int); +static int null_send(void *, const char *, int); +static int loop_send(void *, const char *, int); static int null_sendbuffer(void *); static void null_size(void *, int, int); static void null_special(void *, Telnet_Special); @@ -73,14 +73,14 @@ struct loop_state { }; static const char *null_init(void *frontend_handle, void **backend_handle, - Conf *conf, char *host, int port, + Conf *conf, const char *host, int port, char **realhost, int nodelay, int keepalive) { return NULL; } static const char *loop_init(void *frontend_handle, void **backend_handle, - Conf *conf, char *host, int port, + Conf *conf, const char *host, int port, char **realhost, int nodelay, int keepalive) { struct loop_state *st = snew(struct loop_state); @@ -104,12 +104,12 @@ static void null_reconfig(void *handle, Conf *conf) { } -static int null_send(void *handle, char *buf, int len) { +static int null_send(void *handle, const char *buf, int len) { return 0; } -static int loop_send(void *handle, char *buf, int len) { +static int loop_send(void *handle, const char *buf, int len) { struct loop_state *st = handle; return from_backend(st->term, 0, buf, len);