You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2019/07/29 20:36:49 UTC

[mynewt-newtmgr] 02/02: nmxact: treat 0-length and nil tokens as equal

This is an automated email from the ASF dual-hosted git repository.

ccollins pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-newtmgr.git

commit fdf3b5ea24b087662ad2bde3821b3b46981574c6
Author: Christopher Collins <cc...@apache.org>
AuthorDate: Mon Jul 29 12:13:53 2019 -0700

    nmxact: treat 0-length and nil tokens as equal
---
 nmxact/nmcoap/listener.go | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/nmxact/nmcoap/listener.go b/nmxact/nmcoap/listener.go
index 68e6c4e..beb0f02 100644
--- a/nmxact/nmcoap/listener.go
+++ b/nmxact/nmcoap/listener.go
@@ -75,10 +75,6 @@ func MatchMsgCriteria(listenc MsgCriteria, msgc MsgCriteria) bool {
 
 	// Second sort key: token.
 	if listenc.Token != nil {
-		if msgc.Token == nil {
-			return false
-		}
-
 		if bytes.Compare(listenc.Token, msgc.Token) != 0 {
 			return false
 		}