mirror of
https://github.com/dynup/kpatch
synced 2025-04-23 23:45:21 +00:00
fix conditional in find_section_by_index()
Signed-off-by: Seth Jennings <sjenning@redhat.com>
This commit is contained in:
parent
634b9cee78
commit
026362fab6
@ -173,7 +173,7 @@ int is_rela_section(struct section *sec)
|
|||||||
|
|
||||||
struct section *find_section_by_index(struct table *table, unsigned int index)
|
struct section *find_section_by_index(struct table *table, unsigned int index)
|
||||||
{
|
{
|
||||||
if (index == 0 || index >= table->nr)
|
if (index == 0 || index > table->nr)
|
||||||
return NULL;
|
return NULL;
|
||||||
return &((struct section *)(table->data))[index-1];
|
return &((struct section *)(table->data))[index-1];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user