diff options
author | Tom Rini <trini@konsulko.com> | 2024-01-17 09:12:27 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-01-17 09:12:27 -0500 |
commit | 106332d6cc583c4339e07020989d09b567900a59 (patch) | |
tree | 746beb976633e80b5c824805100490bb51cb9ffb /lib/smbios-parser.c | |
parent | 043ca8c8a9b181cf6f17441e9b89b5ee33206309 (diff) | |
parent | a300ac3851440906a3934915bd12db2b96987a6a (diff) |
Merge branch '2024-01-16-assorted-updates-and-improvements'
- Add more pytests to exercise functionality on real hardware, cleanup
and add tests around "cp"/memmove, add phyCORE-AM62x and Phytium
Pe2201 platforms, Nuvoton NPCM BMC reset driver and improve QEMU
SMBIOS support
Diffstat (limited to 'lib/smbios-parser.c')
-rw-r--r-- | lib/smbios-parser.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/smbios-parser.c b/lib/smbios-parser.c index e1180efae18..ac9a367a878 100644 --- a/lib/smbios-parser.c +++ b/lib/smbios-parser.c @@ -39,14 +39,7 @@ static u8 *find_next_header(u8 *pos) return pos; } -static struct smbios_header *get_next_header(struct smbios_header *curr) -{ - u8 *pos = ((u8 *)curr) + curr->length; - - return (struct smbios_header *)find_next_header(pos); -} - -static const struct smbios_header *next_header(const struct smbios_header *curr) +static struct smbios_header *get_next_header(const struct smbios_header *curr) { u8 *pos = ((u8 *)curr) + curr->length; @@ -62,7 +55,7 @@ const struct smbios_header *smbios_header(const struct smbios_entry *entry, int if (header->type == type) return header; - header = next_header(header); + header = get_next_header(header); } return NULL; |