浏览代码

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

spotted by cppcheck

Signed-off-by: Toralf Förster <toralf.foerster@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Toralf Förster 11 年之前
父节点
当前提交
34683a5c6e
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      drivers/staging/iio/Documentation/iio_utils.h

+ 2 - 2
drivers/staging/iio/Documentation/iio_utils.h

@@ -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,
 				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) {