Add assertion to clarify assumption made in order to avoid UB

This commit is contained in:
practicalswift
2018-02-08 09:09:17 +01:00
committed by Christian Decker
parent eb0603bd13
commit 5474512c31

View File

@@ -316,7 +316,7 @@ static void random_mark_channel_unroutable(struct log *log,
size_t i;
const struct short_channel_id *channel;
u8 *msg;
assert(tal_len(route_channels) != 0);
assert(num_channels != 0);
/* Select one channel by random. */
randombytes_buf(&i, sizeof(i));