summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Singer <felixsinger@posteo.net>2022-07-17 00:51:08 +0200
committerAnastasia Klimchuk <aklm@chromium.org>2022-08-14 23:41:26 +0000
commita063073dc5f7676958873e003bb3e924a283f462 (patch)
tree4b2073259386907045f15cce39c83eff7ec46417
parenta93c2e7d1ee7af62c1f9bb342e6025ae1aa4c90d (diff)
downloadflashrom-a063073dc5f7676958873e003bb3e924a283f462.tar.gz
flashrom-a063073dc5f7676958873e003bb3e924a283f462.tar.bz2
flashrom-a063073dc5f7676958873e003bb3e924a283f462.zip
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>
-rw-r--r--digilent_spi.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/digilent_spi.c b/digilent_spi.c
index ac42ba5aa..d251f0902 100644
--- a/digilent_spi.c
+++ b/digilent_spi.c
@@ -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) {