From 78d9c7d02c0eb9720a40d9fe80a4843c064fd3c6 Mon Sep 17 00:00:00 2001 From: Nico Huber Date: Sun, 16 Jun 2019 20:17:19 +0200 Subject: layout: Drop `count` parameter of flashrom_layout_new() Change-Id: I22c180c9971068b1ae101845ce88484c6842b852 Signed-off-by: Nico Huber Reviewed-on: https://review.coreboot.org/c/flashrom/+/33544 Reviewed-by: Angel Pons Reviewed-by: Anastasia Klimchuk Reviewed-by: Edward O'Callaghan Tested-by: build bot (Jenkins) --- layout.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'layout.c') diff --git a/layout.c b/layout.c index 8047a93a3..e71f6a40c 100644 --- a/layout.c +++ b/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) { -- cgit v1.2.3