summaryrefslogtreecommitdiff
path: root/tools/iio/lsiio.c
diff options
context:
space:
mode:
authorHartmut Knaack <knaack.h@gmx.de>2015-06-10 22:51:21 +0300
committerJonathan Cameron <jic23@kernel.org>2015-06-13 20:54:05 +0300
commita9d7acc8b0d52ae2f15f6280f63ac9d1e73cfb78 (patch)
treebb89b08638a1b58f3ccde9678ce2a3be48a06bda /tools/iio/lsiio.c
parent7663a4aac625268674060d78ee00f97a36a03af7 (diff)
downloadlinux-a9d7acc8b0d52ae2f15f6280f63ac9d1e73cfb78.tar.xz
tools:iio: rename variables
Use more appropriate/common variable names: * namepf instead of nameFile in iio_utils.c * ret instead of retval in lsiio.c Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'tools/iio/lsiio.c')
-rw-r--r--tools/iio/lsiio.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/tools/iio/lsiio.c b/tools/iio/lsiio.c
index f5b3bd0267d5..7f432a55a6c4 100644
--- a/tools/iio/lsiio.c
+++ b/tools/iio/lsiio.c
@@ -61,16 +61,16 @@ static int dump_one_device(const char *dev_dir_name)
{
char name[IIO_MAX_NAME_LENGTH];
int dev_idx;
- int retval;
+ int ret;
- retval = sscanf(dev_dir_name + strlen(iio_dir) + strlen(type_device),
- "%i", &dev_idx);
- if (retval != 1)
+ ret = sscanf(dev_dir_name + strlen(iio_dir) + strlen(type_device), "%i",
+ &dev_idx);
+ if (ret != 1)
return -EINVAL;
- retval = read_sysfs_string("name", dev_dir_name, name);
- if (retval)
- return retval;
+ ret = read_sysfs_string("name", dev_dir_name, name);
+ if (ret)
+ return ret;
printf("Device %03d: %s\n", dev_idx, name);
@@ -84,16 +84,16 @@ static int dump_one_trigger(const char *dev_dir_name)
{
char name[IIO_MAX_NAME_LENGTH];
int dev_idx;
- int retval;
+ int ret;
- retval = sscanf(dev_dir_name + strlen(iio_dir) + strlen(type_trigger),
- "%i", &dev_idx);
- if (retval != 1)
+ ret = sscanf(dev_dir_name + strlen(iio_dir) + strlen(type_trigger),
+ "%i", &dev_idx);
+ if (ret != 1)
return -EINVAL;
- retval = read_sysfs_string("name", dev_dir_name, name);
- if (retval)
- return retval;
+ ret = read_sysfs_string("name", dev_dir_name, name);
+ if (ret)
+ return ret;
printf("Trigger %03d: %s\n", dev_idx, name);