1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-03 12:32:47 -05:00

Centralise stub plug/socket functions.

In the previous few commits I noticed some repeated work in the form
of pointless empty implementations of Plug's log method, plus some
existing (and some new) empty cases of Socket's endpoint_info. As a
cleanup, I'm replacing as many as I can find with uses of a central
null implementation in the stubs directory.
This commit is contained in:
Simon Tatham
2024-06-29 12:07:59 +01:00
parent 7618e079f5
commit 807ed08da0
12 changed files with 38 additions and 81 deletions

12
stubs/null-socket.c Normal file
View File

@ -0,0 +1,12 @@
/*
* null-socket.c: provide a null implementation of any Socket vtable
* method that might otherwise need to be reimplemented in multiple
* places as a no-op.
*/
#include "putty.h"
SocketEndpointInfo *nullsock_endpoint_info(Socket *s, bool peer)
{
return NULL;
}