From 28ced626a3e9a2422eb41ea86fb9b3cd154c21d0 Mon Sep 17 00:00:00 2001 From: Andrei Vagin Date: Fri, 2 Oct 2020 14:25:59 -0700 Subject: tools/checkescape: trim the "(SB)" before searching it in the allowed list Signed-off-by: Andrei Vagin --- tools/checkescape/checkescape.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tools/checkescape/checkescape.go') diff --git a/tools/checkescape/checkescape.go b/tools/checkescape/checkescape.go index dd2fcb961..f5bba9980 100644 --- a/tools/checkescape/checkescape.go +++ b/tools/checkescape/checkescape.go @@ -441,9 +441,8 @@ NextLine: // Is this an "allowed" function definition? if len(fields) >= 2 && fields[0] == "TEXT" { - if _, ok := funcsAllowed[fields[1]]; ok { - nextFunc = strings.TrimSuffix(fields[1], "(SB)") - } else { + nextFunc = strings.TrimSuffix(fields[1], "(SB)") + if _, ok := funcsAllowed[nextFunc]; !ok { nextFunc = "" // Don't record addresses. } } -- cgit v1.2.3