[dpdk-dev] eal: fix fscanf format mismatch
Commit Message
Variables are unsigned int but format scans for signed int.
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
---
lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Sergio Gonzalez
> Monroy
> Sent: Thursday, February 12, 2015 3:40 PM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH] eal: fix fscanf format mismatch
>
> 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>
> > 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>
Applied, thanks
@@ -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__);