From 45b07e7e898657c2b7c1d2a7cb25263da03a902f Mon Sep 17 00:00:00 2001 From: lisa neigut Date: Fri, 5 Oct 2018 13:21:22 -0700 Subject: [PATCH] jsonrpc: fix cppcheck warning for potential null pointer deref cppcheck was failing with a warning for a null pointer deref at this line, this makes it stop complaining (and lets make check-source succeed) --- lightningd/jsonrpc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lightningd/jsonrpc.c b/lightningd/jsonrpc.c index 626e1f874..70e3d2423 100644 --- a/lightningd/jsonrpc.c +++ b/lightningd/jsonrpc.c @@ -319,6 +319,7 @@ static void connection_complete_error(struct json_connection *jcon, assert(id != NULL); + assert(cmd); if (cmd->ok) *(cmd->ok) = false;