summaryrefslogtreecommitdiff
path: root/tools/iio/iio_utils.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/iio_utils.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/iio_utils.c')
-rw-r--r--tools/iio/iio_utils.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/iio/iio_utils.c b/tools/iio/iio_utils.c
index 4eac11ad38c4..8fb3214c70f2 100644
--- a/tools/iio/iio_utils.c
+++ b/tools/iio/iio_utils.c
@@ -561,7 +561,7 @@ int find_type_by_name(const char *name, const char *type)
const struct dirent *ent;
int number, numstrlen, ret;
- FILE *nameFile;
+ FILE *namefp;
DIR *dp;
char thisname[IIO_MAX_NAME_LENGTH];
char *filename;
@@ -607,20 +607,20 @@ int find_type_by_name(const char *name, const char *type)
goto error_close_dir;
}
- nameFile = fopen(filename, "r");
- if (!nameFile) {
+ namefp = fopen(filename, "r");
+ if (!namefp) {
free(filename);
continue;
}
free(filename);
errno = 0;
- if (fscanf(nameFile, "%s", thisname) != 1) {
+ if (fscanf(namefp, "%s", thisname) != 1) {
ret = errno ? -errno : -ENODATA;
goto error_close_dir;
}
- if (fclose(nameFile)) {
+ if (fclose(namefp)) {
ret = -errno;
goto error_close_dir;
}