summaryrefslogtreecommitdiffhomepage
path: root/tools/checkescape/checkescape.go
diff options
context:
space:
mode:
authorAndrei Vagin <avagin@gmail.com>2020-10-02 14:25:59 -0700
committerAndrei Vagin <avagin@gmail.com>2020-10-02 14:27:49 -0700
commit28ced626a3e9a2422eb41ea86fb9b3cd154c21d0 (patch)
treea9285798b1e93855a4bf79884042354dd9925ba2 /tools/checkescape/checkescape.go
parentde85b045d42f503d6463a86145d797b8deb22604 (diff)
tools/checkescape: trim the "(SB)" before searching it in the allowed list
Signed-off-by: Andrei Vagin <avagin@gmail.com>
Diffstat (limited to 'tools/checkescape/checkescape.go')
-rw-r--r--tools/checkescape/checkescape.go5
1 files changed, 2 insertions, 3 deletions
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.
}
}