gossipd: use array[32] not pointer for alias.

And use ARRAY_SIZE() everywhere which will break compile if it's not a
literal array, plus assertions that it's the same length.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2018-09-24 11:11:39 +09:30
committed by Christian Decker
parent 6c54a22d63
commit afc92dd757
6 changed files with 20 additions and 19 deletions

View File

@@ -110,8 +110,8 @@ struct node {
struct chan *prev;
} bfg[ROUTING_MAX_HOPS+1];
/* UTF-8 encoded alias as tal_arr, not zero terminated */
u8 *alias;
/* UTF-8 encoded alias, not zero terminated */
u8 alias[32];
/* Color to be used when displaying the name */
u8 rgb_color[3];