Browse Source

sphinx: memset warning suppression workaround.

Milan summit finalized some changes, so this will be reworked
soon anyway.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ppa-0.6.1
Rusty Russell 8 years ago
parent
commit
af9ee44d52
  1. 2
      daemon/sphinx.c

2
daemon/sphinx.c

@ -401,7 +401,9 @@ struct onionpacket *create_onionpacket(
if (MESSAGE_SIZE > messagelen) {
memset(&packet->hoppayloads, 0, TOTAL_HOP_PAYLOAD_SIZE);
#if MESSAGE_SIZE != 0 /* Suppress GCC warning about 0-length memset */
memset(&packet->payload, 0xFF, MESSAGE_SIZE);
#endif
memcpy(&packet->payload, message, messagelen);
packet->payload[messagelen] = 0x7f;
}

Loading…
Cancel
Save