Edward O'Callaghan submitted this change.

View Change

Approvals: build bot (Jenkins): Verified Nico Huber: Looks good to me, approved Anastasia Klimchuk: Looks good to me, approved
flashrom.c: Make extract_param() static local

The function is only ever used within flashrom.c.

BUG=none
BRANCH=none
TEST=builds

Change-Id: I81f1cdb9df98c151201390edeb69c74defe7881f
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/56295
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
---
M flash.h
M flashrom.c
2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/flash.h b/flash.h
index c6a53b1..3baa076 100644
--- a/flash.h
+++ b/flash.h
@@ -344,7 +344,6 @@
int erase_flash(struct flashctx *flash);
int probe_flash(struct registered_master *mst, int startchip, struct flashctx *fill_flash, int force);
int read_flash_to_file(struct flashctx *flash, const char *filename);
-char *extract_param(const char *const *haystack, const char *needle, const char *delim);
int verify_range(struct flashctx *flash, const uint8_t *cmpbuf, unsigned int start, unsigned int len);
int need_erase(const uint8_t *have, const uint8_t *want, unsigned int len, enum write_granularity gran, const uint8_t erased_value);
void print_version(void);
diff --git a/flashrom.c b/flashrom.c
index 6cc899f..1f94f33 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -272,7 +272,7 @@
* needle and remove everything from the first occurrence of needle to the next
* delimiter from haystack.
*/
-char *extract_param(const char *const *haystack, const char *needle, const char *delim)
+static char *extract_param(const char *const *haystack, const char *needle, const char *delim)
{
char *param_pos, *opt_pos, *rest;
char *opt = NULL;

To view, visit change 56295. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I81f1cdb9df98c151201390edeb69c74defe7881f
Gerrit-Change-Number: 56295
Gerrit-PatchSet: 2
Gerrit-Owner: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-Reviewer: Anastasia Klimchuk <aklm@chromium.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-Reviewer: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-MessageType: merged