[PATCH 27/32] tools:iio:iio_utils: move up reset of sysfsfp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>
---
 tools/iio/iio_utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/iio/iio_utils.c b/tools/iio/iio_utils.c
index c83f4df..7c0abb3 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)
-- 
2.3.6

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux