eal/linux: fix fscanf format mismatch
authorSergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Thu, 12 Feb 2015 15:39:37 +0000 (15:39 +0000)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Fri, 20 Feb 2015 10:08:29 +0000 (11:08 +0100)
Variables are unsigned int but format scans for signed int.

Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
lib/librte_eal/linuxapp/eal/eal_pci_uio.c

index e53f06b..54cce08 100644 (file)
@@ -176,7 +176,7 @@ pci_mknod_uio_dev(const char *sysfs_uio_path, unsigned uio_num)
                return -1;
        }
 
-       ret = fscanf(f, "%d:%d", &major, &minor);
+       ret = fscanf(f, "%u:%u", &major, &minor);
        if (ret != 2) {
                RTE_LOG(ERR, EAL, "%s(): cannot parse sysfs to get major:minor\n",
                        __func__);