Commit d07391d3 authored by Michael Scott's avatar Michael Scott Committed by Jukka Rissanen
Browse files

net: coap: clear more fields in coap_reply_clear()

We only clear 3 of the 6 member variables of the coap_reply structure
in coap_reply_clear().

Let's make sure to reset all of them.

Signed-off-by: default avatarMichael Scott <michael@opensourcefoundries.com>
parent bb98d876
Loading
Loading
Loading
Loading
+1 −3
Changes for subsys/net/lib/coap/coap.c: 1 added line, 3 removed lines.
Original line number Diff line number Diff line
@@ -787,9 +787,7 @@ void coap_reply_init(struct coap_reply *reply,

void coap_reply_clear(struct coap_reply *reply)
{
	reply->id = 0;
	reply->tkl = 0;
	reply->reply = NULL;
	memset(reply, 0, sizeof(*reply));
}

int coap_resource_notify(struct coap_resource *resource)