From 0655b4f1e03ff7596e8aaf9cded138037cf5cefd Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Mon, 25 Jan 2021 22:44:36 +0100 Subject: [PATCH] Check if the last word is 'MASK', not if it ends with 'MASK' At the moment it makes no difference, but it could if e.g. a new algorithm was called 'foomask'. Signed-off-by: Gilles Peskine --- scripts/mbedtls_dev/macro_collector.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/mbedtls_dev/macro_collector.py b/scripts/mbedtls_dev/macro_collector.py index ca277795c..b98e40e5f 100644 --- a/scripts/mbedtls_dev/macro_collector.py +++ b/scripts/mbedtls_dev/macro_collector.py @@ -50,7 +50,7 @@ class PSAMacroCollector: return True if '_CATEGORY_' in name: return True - return name.endswith('_FLAG') or name.endswith('MASK') + return name.endswith('_FLAG') or name.endswith('_MASK') # "#define" followed by a macro name with either no parameters # or a single parameter and a non-empty expansion.