Skip to content

Commit 34683a5

Browse files
toralfjic23
authored andcommitted
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>
1 parent a91a73c commit 34683a5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎drivers/staging/iio/Documentation/iio_utils.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ inline int build_channel_array(const char *device_dir,
318318
free(filename);
319319
goto error_close_dir;
320320
}
321-
fscanf(sysfsfp, "%u", &ret);
321+
fscanf(sysfsfp, "%i", &ret);
322322
if (ret == 1)
323323
(*counter)++;
324324
fclose(sysfsfp);
@@ -350,7 +350,7 @@ inline int build_channel_array(const char *device_dir,
350350
ret = -errno;
351351
goto error_cleanup_array;
352352
}
353-
fscanf(sysfsfp, "%u", &current_enabled);
353+
fscanf(sysfsfp, "%i", &current_enabled);
354354
fclose(sysfsfp);
355355

356356
if (!current_enabled) {

0 commit comments

Comments
 (0)