summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean Delvare <jdelvare@suse.de>2020-12-10 11:21:45 +0100
committerJean Delvare <jdelvare@suse.de>2020-12-10 11:21:45 +0100
commit0a2387acbb477ef5d79679c66a6ffa6e990274c5 (patch)
treea86fc9a96eba3149ece0625ad41ea48e57365b4e
parent617957c22f74ab2dadc16663b6c694e594ba921f (diff)
downloaddmidecode-git-0a2387acbb477ef5d79679c66a6ffa6e990274c5.tar.gz
dmioem: Rename the first parameter of dmi_set_vendor
When dmi_set_vendor took a single parameter, naming it "s" for "string" was OK. But now it takes two, so this could be confusing. Rename "s" to "v" to make it clear it is the vendor. Signed-off-by: Jean Delvare <jdelvare@suse.de>
-rw-r--r--dmioem.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/dmioem.c b/dmioem.c
index f4be628..217850e 100644
--- a/dmioem.c
+++ b/dmioem.c
@@ -50,7 +50,7 @@ static const char *dmi_product = NULL;
* value if we know how to decode at least one specific entry type for
* that vendor.
*/
-void dmi_set_vendor(const char *s, const char *p)
+void dmi_set_vendor(const char *v, const char *p)
{
const struct { const char *str; enum DMI_VENDORS id; } vendor[] = {
{ "Acer", VENDOR_ACER },
@@ -68,14 +68,14 @@ void dmi_set_vendor(const char *s, const char *p)
* Often DMI strings have trailing spaces. Ignore these
* when checking for known vendor names.
*/
- len = strlen(s);
- while (len && s[len - 1] == ' ')
+ len = strlen(v);
+ while (len && v[len - 1] == ' ')
len--;
for (i = 0; i < ARRAY_SIZE(vendor); i++)
{
if (strlen(vendor[i].str) == len &&
- strncmp(s, vendor[i].str, len) == 0)
+ strncmp(v, vendor[i].str, len) == 0)
{
dmi_vendor = vendor[i].id;
break;