From 6ac43308b5ca93455456f5be8666eb4cde1143ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= Date: Tue, 6 Nov 2018 15:48:51 +0100 Subject: [PATCH] libsensors: Rename a local variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- lib/sysfs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/sysfs.c b/lib/sysfs.c index d486528e..f5738d54 100644 --- a/lib/sysfs.c +++ b/lib/sysfs.c @@ -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)