wire/test: remove unused padding code.
Turns out the peer part of the spec no longer uses padding (it's used only in the onion), and GCC-9 with -O3 warns we're padding NULL to memcpy. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
c233fc5063
commit
5b7776cf13
|
@ -1,15 +1,8 @@
|
|||
#include "../gen_peer_wire.c"
|
||||
|
||||
void towire_pad_orig(u8 **pptr, size_t num);
|
||||
#define towire_pad towire_pad_orig
|
||||
void fromwire_pad_orig(const u8 **cursor, size_t *max, size_t num);
|
||||
#define towire_pad towire_pad_orig
|
||||
#define fromwire_pad fromwire_pad_orig
|
||||
#include "../towire.c"
|
||||
#include "../fromwire.c"
|
||||
#include "../peer_wire.c"
|
||||
#undef towire_pad
|
||||
#undef fromwire_pad
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
|
@ -21,19 +14,6 @@ secp256k1_context *secp256k1_ctx;
|
|||
/* AUTOGENERATED MOCKS START */
|
||||
/* AUTOGENERATED MOCKS END */
|
||||
|
||||
/* We allow non-zero padding for testing. */
|
||||
static const void *towire_pad_arr;
|
||||
void towire_pad(u8 **pptr, size_t num)
|
||||
{
|
||||
towire_u8_array(pptr, towire_pad_arr, num);
|
||||
}
|
||||
|
||||
static void *fromwire_pad_arr;
|
||||
void fromwire_pad(const u8 **cursor, size_t *max, size_t num)
|
||||
{
|
||||
fromwire(cursor, max, fromwire_pad_arr, num);
|
||||
}
|
||||
|
||||
/* memsetting pubkeys doesn't work */
|
||||
static void set_pubkey(struct pubkey *key)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue