makesyscalls: make strip_abi_prefix more robust

Allow strip_abi_prefix() to be called with nil and return nil in that
case.  This simplifies handling of RESERVED entries.

Reviewed by:	kevans
This commit is contained in:
Brooks Davis 2021-11-17 20:12:21 +00:00
parent 8a693ccf86
commit 1739de97af

View File

@ -352,6 +352,9 @@ end
local function strip_abi_prefix(funcname)
local abiprefix = config["abi_func_prefix"]
local stripped_name
if funcname == nil then
return nil
end
if abiprefix ~= "" and funcname:find("^" .. abiprefix) then
stripped_name = funcname:gsub("^" .. abiprefix, "")
else