libsensors: Rename a local variable

Rename a local variable to make it consistent with other parts of the
code. The variable is called (more descriptively) "dev_name"
in sensors_read_one_sysfs_chip(), so let's rename it to that.

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
This commit is contained in:
Ondřej Lysoněk committed 2018-11-23 11:33:05 +01:00
1 parent 0fbfc3b6e0
commit 6ac43308b5
1 file changed
+4 -4
+4 -4
View File
@@ -803,7 +803,7 @@ static int sensors_read_sysfs_chips_compat(void)
static int sensors_add_hwmon_device(const char *path, const char *classdev)
{
char linkpath[NAME_MAX];
char device[NAME_MAX], *device_p;
char device[NAME_MAX], *dev_name;
int dev_len, err;
(void)classdev; /* hide warning */
@@ -814,13 +814,13 @@ static int sensors_add_hwmon_device(const char *path, const char *classdev)
err = sensors_read_one_sysfs_chip(NULL, NULL, path);
} else {
device[dev_len] = '\0';
device_p = strrchr(device, '/') + 1;
dev_name = strrchr(device, '/') + 1;
/* The attributes we want might be those of the hwmon class
device, or those of the device itself. */
err = sensors_read_one_sysfs_chip(linkpath, device_p, path);
err = sensors_read_one_sysfs_chip(linkpath, dev_name, path);
if (err == 0)
err = sensors_read_one_sysfs_chip(linkpath, device_p,
err = sensors_read_one_sysfs_chip(linkpath, dev_name,
linkpath);
}
if (err < 0)