layout: Drop `count` parameter of flashrom_layout_new()
Change-Id: I22c180c9971068b1ae101845ce88484c6842b852
Signed-off-by: Nico Huber <nico.h@gmx.de>
Original-Reviewed-on: https://review.coreboot.org/c/flashrom/+/33544
Original-Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Original-Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Original-Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom-stable/+/72218
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/layout.c b/layout.c
index 917853e..d2a2908 100644
--- a/layout.c
+++ b/layout.c
@@ -33,7 +33,7 @@
struct flashrom_layout *get_global_layout(void)
{
if (!global_layout)
- flashrom_layout_new(&global_layout, 0);
+ flashrom_layout_new(&global_layout);
return global_layout;
}
@@ -270,12 +270,11 @@
* @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) {