]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
sysfs: fix printf format warnings
authorSami Kerola <kerolasa@iki.fi>
Sun, 10 Jun 2012 14:48:31 +0000 (16:48 +0200)
committerSami Kerola <kerolasa@iki.fi>
Mon, 11 Jun 2012 17:51:35 +0000 (19:51 +0200)
sysfs.c:93:3: warning: format '%u' expects argument of type 'unsigned
int *', but argument 3 has type 'int *' [-Wformat]
sysfs.c:93:3: warning: format '%u' expects argument of type 'unsigned
int *', but argument 4 has type 'int *' [-Wformat]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
lib/sysfs.c

index 3b5d045c4f2e83bed81ca372e3272f9048335650..312191f034e98869bf72c697b95b6b2a1efc7ce3 100644 (file)
@@ -90,7 +90,7 @@ dev_t sysfs_devname_to_devno(const char *name, const char *parent)
                if (!f)
                        return 0;
 
-               if (fscanf(f, "%u:%u", &maj, &min) == 2)
+               if (fscanf(f, "%d:%d", &maj, &min) == 2)
                        dev = makedev(maj, min);
                fclose(f);
        }