summaryrefslogtreecommitdiff
path: root/tools/iio
diff options
context:
space:
mode:
authorHartmut Knaack <knaack.h@gmx.de>2015-05-31 14:40:20 +0200
committerJonathan Cameron <jic23@kernel.org>2015-06-01 08:37:09 +0100
commitace76e42bcd5d67e5be303997a4dc325d44366ce (patch)
tree8f293c39f9dc22632534574b7d067b9b584e90e4 /tools/iio
parent33ebcb21a67f257faf1128f08a6d7c0299cb0da2 (diff)
tools:iio:iio_utils: move up reset of sysfsfp
In iioutils_get_type() it is logically better fitting to have sysfsfp assigned zero right after closing it. Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'tools/iio')
-rw-r--r--tools/iio/iio_utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/iio/iio_utils.c b/tools/iio/iio_utils.c
index c83f4dfe71d6..7c0abb306f5a 100644
--- a/tools/iio/iio_utils.c
+++ b/tools/iio/iio_utils.c
@@ -175,10 +175,10 @@ int iioutils_get_type(unsigned *is_signed,
goto error_free_filename;
}
+ sysfsfp = 0;
free(filename);
filename = 0;
- sysfsfp = 0;
}
error_close_sysfsfp:
if (sysfsfp)