зеркало из https://github.com/github/putty.git
Add missing 'static' to BPP vtable definitions.
Vtable objects only need to be globally visible throughout the code if they're used directly in some interchangeable way, e.g. by passing them to a constructor like cipher_new that's the same for all implementations of the vtable, or by directly looking up public data fields in the vtable itself. But the BPPs are never used like that: each BPP has its own constructor function with a different type signature, so the BPP types are not interchangeable in any way _before_ an instance of one has been constructed. Hence, their vtable objects don't need external linkage.
This commit is contained in:
Родитель
ed70e6014c
Коммит
26f7a2ac72
|
@ -33,7 +33,7 @@ static void ssh1_bpp_handle_input(BinaryPacketProtocol *bpp);
|
|||
static PktOut *ssh1_bpp_new_pktout(int type);
|
||||
static void ssh1_bpp_format_packet(BinaryPacketProtocol *bpp, PktOut *pkt);
|
||||
|
||||
const struct BinaryPacketProtocolVtable ssh1_bpp_vtable = {
|
||||
static const struct BinaryPacketProtocolVtable ssh1_bpp_vtable = {
|
||||
ssh1_bpp_free,
|
||||
ssh1_bpp_handle_input,
|
||||
ssh1_bpp_new_pktout,
|
||||
|
|
|
@ -25,7 +25,7 @@ static void ssh2_bare_bpp_handle_input(BinaryPacketProtocol *bpp);
|
|||
static PktOut *ssh2_bare_bpp_new_pktout(int type);
|
||||
static void ssh2_bare_bpp_format_packet(BinaryPacketProtocol *bpp, PktOut *);
|
||||
|
||||
const struct BinaryPacketProtocolVtable ssh2_bare_bpp_vtable = {
|
||||
static const struct BinaryPacketProtocolVtable ssh2_bare_bpp_vtable = {
|
||||
ssh2_bare_bpp_free,
|
||||
ssh2_bare_bpp_handle_input,
|
||||
ssh2_bare_bpp_new_pktout,
|
||||
|
|
|
@ -42,7 +42,7 @@ static void ssh2_bpp_handle_input(BinaryPacketProtocol *bpp);
|
|||
static PktOut *ssh2_bpp_new_pktout(int type);
|
||||
static void ssh2_bpp_format_packet(BinaryPacketProtocol *bpp, PktOut *pkt);
|
||||
|
||||
const struct BinaryPacketProtocolVtable ssh2_bpp_vtable = {
|
||||
static const struct BinaryPacketProtocolVtable ssh2_bpp_vtable = {
|
||||
ssh2_bpp_free,
|
||||
ssh2_bpp_handle_input,
|
||||
ssh2_bpp_new_pktout,
|
||||
|
|
|
@ -44,7 +44,7 @@ static void ssh_verstring_handle_input(BinaryPacketProtocol *bpp);
|
|||
static PktOut *ssh_verstring_new_pktout(int type);
|
||||
static void ssh_verstring_format_packet(BinaryPacketProtocol *bpp, PktOut *);
|
||||
|
||||
const struct BinaryPacketProtocolVtable ssh_verstring_vtable = {
|
||||
static const struct BinaryPacketProtocolVtable ssh_verstring_vtable = {
|
||||
ssh_verstring_free,
|
||||
ssh_verstring_handle_input,
|
||||
ssh_verstring_new_pktout,
|
||||
|
|
Загрузка…
Ссылка в новой задаче