aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/flex_array.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/lib/flex_array.c b/lib/flex_array.c
index 0e7894ce8882..08f1636d296a 100644
--- a/lib/flex_array.c
+++ b/lib/flex_array.c
@@ -254,7 +254,6 @@ void *flex_array_get(struct flex_array *fa, int element_nr)
254{ 254{
255 int part_nr = fa_element_to_part_nr(fa, element_nr); 255 int part_nr = fa_element_to_part_nr(fa, element_nr);
256 struct flex_array_part *part; 256 struct flex_array_part *part;
257 int index;
258 257
259 if (element_nr >= fa->total_nr_elements) 258 if (element_nr >= fa->total_nr_elements)
260 return NULL; 259 return NULL;
@@ -264,6 +263,5 @@ void *flex_array_get(struct flex_array *fa, int element_nr)
264 part = (struct flex_array_part *)&fa->parts[0]; 263 part = (struct flex_array_part *)&fa->parts[0];
265 else 264 else
266 part = fa->parts[part_nr]; 265 part = fa->parts[part_nr];
267 index = index_inside_part(fa, element_nr);
268 return &part->elements[index_inside_part(fa, element_nr)]; 266 return &part->elements[index_inside_part(fa, element_nr)];
269} 267}