diff options
| author | Sunil Nimmagadda <sunil@nimmagadda.net> | 2026-10-30 17:54:49 +0530 |
|---|---|---|
| committer | Sunil Nimmagadda <sunil@nimmagadda.net> | 2026-10-30 17:54:49 +0530 |
| commit | 57cf05f14ef95b3d99fa1c0b33561aff72a65369 (patch) | |
| tree | 9a28342f3edbc0f11776ec8e41957c917ee47b22 /elf | |
| parent | 7664fc1e915ac57aefd1e9590ab9727d40954de6 (diff) | |
Better place to check them is loadconfig.
Can't setmetatable() in loadconfig without the type check. These are
redundant here now.
Diffstat (limited to 'elf')
| -rw-r--r-- | elf/section.lua | 1 | ||||
| -rw-r--r-- | elf/segment.lua | 1 |
2 files changed, 0 insertions, 2 deletions
diff --git a/elf/section.lua b/elf/section.lua index 801a1d8..805a450 100644 --- a/elf/section.lua +++ b/elf/section.lua @@ -14,7 +14,6 @@ local fmt = require("elf.fmt") local M = {} function M.normalize(section) - if type(section) ~= "table" then error("section must be a table", 3) end if not section.name then error("name is required in section", 3) end if not section.type then error("type is required in section", 3) end if not section.flags then error("flags required in section", 3) end diff --git a/elf/segment.lua b/elf/segment.lua index 8af9146..59863b5 100644 --- a/elf/segment.lua +++ b/elf/segment.lua @@ -15,7 +15,6 @@ local fmt = require("elf.fmt") local M = {} function M.normalize(phdr) - if type(phdr) ~= "table" then error("segment must be table", 3) end if not phdr.type then error("type is required in segment", 3) end phdr.flags = phdr.flags or 0 |
