mirror of
https://review.coreboot.org/flashrom.git
synced 2025-07-02 22:43:17 +02:00
layout: Drop count
parameter of flashrom_layout_new()
Change-Id: I22c180c9971068b1ae101845ce88484c6842b852 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/flashrom/+/33544 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org> Reviewed-by: Edward O'Callaghan <quasisec@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
5
layout.c
5
layout.c
@ -34,7 +34,7 @@ static struct flashrom_layout *global_layout;
|
||||
struct flashrom_layout *get_global_layout(void)
|
||||
{
|
||||
if (!global_layout)
|
||||
flashrom_layout_new(&global_layout, 0);
|
||||
flashrom_layout_new(&global_layout);
|
||||
return global_layout;
|
||||
}
|
||||
|
||||
@ -378,12 +378,11 @@ const struct romentry *layout_next(
|
||||
* @brief Create a new, empty layout.
|
||||
*
|
||||
* @param layout Pointer to returned layout reference.
|
||||
* @param count Number of layout entries to allocate.
|
||||
*
|
||||
* @return 0 on success,
|
||||
* 1 if out of memory.
|
||||
*/
|
||||
int flashrom_layout_new(struct flashrom_layout **const layout, const unsigned int count)
|
||||
int flashrom_layout_new(struct flashrom_layout **const layout)
|
||||
{
|
||||
*layout = malloc(sizeof(**layout));
|
||||
if (!*layout) {
|
||||
|
Reference in New Issue
Block a user