Skip to content
Snippets Groups Projects
Commit ddcfb9ed authored by Heinrich Schuchardt's avatar Heinrich Schuchardt :speech_balloon: Committed by Tom Rini
Browse files

lib: smbios: remove redundant next_header()


next_header() and get_next_header() only differ in how the const attribute
is used. One function taking a const parameter and returning a non-const is
good enough.

Signed-off-by: Heinrich Schuchardt's avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: default avatarIlias Apalodimas <ilias.apalodimas@linaro.org>
parent 1c5aab80
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment