diff options
author | Jean Delvare <jdelvare@suse.de> | 2020-12-10 11:21:45 +0100 |
---|---|---|
committer | Jean Delvare <jdelvare@suse.de> | 2020-12-10 11:21:45 +0100 |
commit | 0a2387acbb477ef5d79679c66a6ffa6e990274c5 (patch) | |
tree | a86fc9a96eba3149ece0625ad41ea48e57365b4e | |
parent | 617957c22f74ab2dadc16663b6c694e594ba921f (diff) | |
download | dmidecode-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.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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; |