diff options
author | Felix Singer <felixsinger@posteo.net> | 2022-08-09 05:54:33 +0200 |
---|---|---|
committer | Anastasia Klimchuk <aklm@chromium.org> | 2022-08-14 23:42:17 +0000 |
commit | 5c644d86efad14850c430328030f804ae83fdf8c (patch) | |
tree | 88d4a4af9f9308a7a92baac1f77d9228ff1e1695 | |
parent | a063073dc5f7676958873e003bb3e924a283f462 (diff) | |
download | flashrom-5c644d86efad14850c430328030f804ae83fdf8c.tar.gz flashrom-5c644d86efad14850c430328030f804ae83fdf8c.tar.bz2 flashrom-5c644d86efad14850c430328030f804ae83fdf8c.zip |
linux_mtd.c: Rename variable param to param_str
Rename the variable param to param_str to indicate that this is the raw
string representation.
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Change-Id: I78a207f11b964424a85e693f0004a33ee7de2e7e
Reviewed-on: https://review.coreboot.org/c/flashrom/+/66567
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nikolai Artemiev <nartemiev@google.com>
Reviewed-by: Thomas Heijligen <src@posteo.de>
-rw-r--r-- | linux_mtd.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/linux_mtd.c b/linux_mtd.c index b3b84222..dd864661 100644 --- a/linux_mtd.c +++ b/linux_mtd.c @@ -495,20 +495,20 @@ linux_mtd_setup_exit: static int linux_mtd_init(void) { - char *param; + char *param_str; int dev_num = 0; int ret = 1; struct linux_mtd_data *data = NULL; - param = extract_programmer_param_str("dev"); - if (param) { + param_str = extract_programmer_param_str("dev"); + if (param_str) { char *endptr; - dev_num = strtol(param, &endptr, 0); + dev_num = strtol(param_str, &endptr, 0); if ((*endptr != '\0') || (dev_num < 0)) { msg_perr("Invalid device number %s. Use flashrom -p " "linux_mtd:dev=N where N is a valid MTD\n" - "device number.\n", param); + "device number.\n", param_str); goto linux_mtd_init_exit; } } @@ -524,13 +524,13 @@ static int linux_mtd_init(void) struct stat s; if (stat(sysfs_path, &s) < 0) { - if (param) + if (param_str) msg_perr("%s does not exist\n", sysfs_path); else msg_pdbg("%s does not exist\n", sysfs_path); goto linux_mtd_init_exit; } - free(param); + free(param_str); data = calloc(1, sizeof(*data)); if (!data) { @@ -547,7 +547,7 @@ static int linux_mtd_init(void) return register_opaque_master(&linux_mtd_opaque_master, data); linux_mtd_init_exit: - free(param); + free(param_str); return ret; } |