1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-04-27 07:02:34 +02:00

digilent_spi.c: Rename variable p to param_str

That's not a very meaningful name and it makes searching within the code
hard. Thus, rename the variable to `param_str`.

Signed-off-by: Felix Singer <felixsinger@posteo.net>
Change-Id: I88a78b612d4d2373943f8daa1b6b6d89329405c2
Reviewed-on: https://review.coreboot.org/c/flashrom/+/65928
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Thomas Heijligen <src@posteo.de>
This commit is contained in:
Felix Singer 2022-07-17 00:51:08 +02:00 committed by Anastasia Klimchuk
parent a93c2e7d1e
commit a063073dc5

View File

@ -376,7 +376,7 @@ static const struct digilent_spispeeds spispeeds[] = {
static int digilent_spi_init(void)
{
char *p;
char *param_str;
uint32_t speed_hz = spispeeds[0].speed;
int i;
struct libusb_device_handle *handle = NULL;
@ -408,28 +408,28 @@ static int digilent_spi_init(void)
goto close_handle;
}
p = extract_programmer_param_str("spispeed");
if (p) {
param_str = extract_programmer_param_str("spispeed");
if (param_str) {
for (i = 0; spispeeds[i].name; ++i) {
if (!strcasecmp(spispeeds[i].name, p)) {
if (!strcasecmp(spispeeds[i].name, param_str)) {
speed_hz = spispeeds[i].speed;
break;
}
}
if (!spispeeds[i].name) {
msg_perr("Error: Invalid spispeed value: '%s'.\n", p);
free(p);
msg_perr("Error: Invalid spispeed value: '%s'.\n", param_str);
free(param_str);
goto close_handle;
}
free(p);
free(param_str);
}
p = extract_programmer_param_str("reset");
if (p && strlen(p))
reset_board = (p[0] == '1');
param_str = extract_programmer_param_str("reset");
if (param_str && strlen(param_str))
reset_board = (param_str[0] == '1');
else
reset_board = default_reset(handle);
free(p);
free(param_str);
if (reset_board) {