gossip: don't use assert around code with side effects.

The use of status_failed() requires a stubs update, which fails
with unnamed parameters, so tweak the status.h header as well.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2017-12-22 11:40:00 +10:30
committed by Christian Decker
parent 0db821e2cf
commit 047a2ea043
5 changed files with 16 additions and 3 deletions

View File

@@ -54,7 +54,7 @@ void status_trace(const char *fmt, ...) PRINTF_FMT(1,2);
/* vprintf-style */
void status_tracev(const char *fmt, va_list ap);
/* Send a failure status code with printf-style msg, and exit. */
void status_failed(enum status_fail, const char *fmt, ...) PRINTF_FMT(2,3) NORETURN;
void status_failed(enum status_fail code, const char *fmt, ...) PRINTF_FMT(2,3) NORETURN;
/* Helper for master failures: sends STATUS_FAIL_MASTER_IO.
* msg NULL == read failure. */