linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fix format string msimatch in staging/iio/Documentation/iio_utils.h
@ 2014-05-24 13:25 Toralf Förster
  2014-05-25 11:11 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Toralf Förster @ 2014-05-24 13:25 UTC (permalink / raw)
  To: jic23; +Cc: linux-iio, Toralf Förster

spotted by cppcheck

Signed-off-by: Toralf Förster <toralf.foerster@gmx.de>
---
 drivers/staging/iio/Documentation/iio_utils.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/iio/Documentation/iio_utils.h b/drivers/staging/iio/Documentation/iio_utils.h
index 2064839..a9cfc06 100644
--- a/drivers/staging/iio/Documentation/iio_utils.h
+++ b/drivers/staging/iio/Documentation/iio_utils.h
@@ -318,7 +318,7 @@ inline int build_channel_array(const char *device_dir,
 				free(filename);
 				goto error_close_dir;
 			}
-			fscanf(sysfsfp, "%u", &ret);
+			fscanf(sysfsfp, "%i", &ret);
 			if (ret == 1)
 				(*counter)++;
 			fclose(sysfsfp);
@@ -350,7 +350,7 @@ inline int build_channel_array(const char *device_dir,
 				ret = -errno;
 				goto error_cleanup_array;
 			}
-			fscanf(sysfsfp, "%u", &current_enabled);
+			fscanf(sysfsfp, "%i", &current_enabled);
 			fclose(sysfsfp);
 
 			if (!current_enabled) {
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-05-25 11:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-24 13:25 [PATCH] fix format string msimatch in staging/iio/Documentation/iio_utils.h Toralf Förster
2014-05-25 11:11 ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).