]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
fix format string missmatch in staging/iio/Documentation/iio_utils.h
authorToralf Förster <toralf.foerster@gmx.de>
Sat, 24 May 2014 13:25:00 +0000 (14:25 +0100)
committerJonathan Cameron <jic23@kernel.org>
Sun, 25 May 2014 11:09:37 +0000 (12:09 +0100)
spotted by cppcheck

Signed-off-by: Toralf Förster <toralf.foerster@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/Documentation/iio_utils.h

index 2064839ef2cd6bec0db18fdd570487b60242d0cd..a9cfc06edb014006091795dee93329ac91b4d6bb 100644 (file)
@@ -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) {