towire: remove useless double-invert in towire_bool.

GCC optimizes it out anyway: I sent an uninitialized var and it sent 8!
The receiver checks the value is 0 or 1 anyway.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2017-09-27 06:32:48 +09:30
parent aea77653d3
commit a8c60ed289

View File

@ -40,7 +40,7 @@ void towire_u64(u8 **pptr, u64 v)
void towire_bool(u8 **pptr, bool v)
{
u8 val = !!v;
u8 val = v;
towire(pptr, &val, sizeof(val));
}