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:
12
stubs/null-socket.c
Normal file
12
stubs/null-socket.c
Normal 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;
|
||||
}
|
Reference in New Issue
Block a user