From e5064a47e7b466b4f7ccebb229b0d0b2d7f09572 Mon Sep 17 00:00:00 2001 From: Olaf Bergmann Date: Fri, 3 Nov 2017 15:15:06 +0100 Subject: [PATCH] client.c: removed dead code in message_handler() Coverity scan has detected dead code that has been removed in this change. (CID 1382575) --- examples/client.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/examples/client.c b/examples/client.c index 1f8902d9..6c78aba5 100644 --- a/examples/client.c +++ b/examples/client.c @@ -528,9 +528,8 @@ message_handler(struct coap_context_t *ctx, } - /* finally send new request, if needed */ - if (pdu && coap_send(session, pdu) == COAP_INVALID_TID) - debug("message_handler: error sending response"); + /* any pdu that has been created in this function must be sent by now */ + assert(pdu == NULL); /* our job is done, we can exit at any time */ ready = coap_check_option(received, COAP_OPTION_SUBSCRIPTION, &opt_iter) == NULL;