From a8c50a37b3ffd78138702325a2e04ca5cc386c4d Mon Sep 17 00:00:00 2001 From: Sergio Gonzalez Monroy Date: Thu, 12 Feb 2015 15:39:37 +0000 Subject: [PATCH] eal/linux: fix fscanf format mismatch Variables are unsigned int but format scans for signed int. Signed-off-by: Sergio Gonzalez Monroy Acked-by: Pablo de Lara --- lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_eal/linuxapp/eal/eal_pci_uio.c b/lib/librte_eal/linuxapp/eal/eal_pci_uio.c index e53f06b824..54cce080e9 100644 --- a/lib/librte_eal/linuxapp/eal/eal_pci_uio.c +++ b/lib/librte_eal/linuxapp/eal/eal_pci_uio.c @@ -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__); -- 2.20.1