提交 34683a5c 编写于 作者: T Toralf Förster 提交者: Jonathan Cameron

fix format string missmatch in staging/iio/Documentation/iio_utils.h

spotted by cppcheck
Signed-off-by: NToralf Förster <toralf.foerster@gmx.de>
Signed-off-by: NJonathan Cameron <jic23@kernel.org>
上级 a91a73c8
...@@ -318,7 +318,7 @@ inline int build_channel_array(const char *device_dir, ...@@ -318,7 +318,7 @@ inline int build_channel_array(const char *device_dir,
free(filename); free(filename);
goto error_close_dir; goto error_close_dir;
} }
fscanf(sysfsfp, "%u", &ret); fscanf(sysfsfp, "%i", &ret);
if (ret == 1) if (ret == 1)
(*counter)++; (*counter)++;
fclose(sysfsfp); fclose(sysfsfp);
...@@ -350,7 +350,7 @@ inline int build_channel_array(const char *device_dir, ...@@ -350,7 +350,7 @@ inline int build_channel_array(const char *device_dir,
ret = -errno; ret = -errno;
goto error_cleanup_array; goto error_cleanup_array;
} }
fscanf(sysfsfp, "%u", &current_enabled); fscanf(sysfsfp, "%i", &current_enabled);
fclose(sysfsfp); fclose(sysfsfp);
if (!current_enabled) { if (!current_enabled) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册