Эх сурвалжийг харах

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 жил өмнө
parent
commit
34683a5c6e

+ 2 - 2
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) {