DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] eal: fix fscanf format mismatch
@ 2015-02-12 15:39 Sergio Gonzalez Monroy
  2015-02-19 11:16 ` De Lara Guarch, Pablo
  0 siblings, 1 reply; 3+ messages in thread
From: Sergio Gonzalez Monroy @ 2015-02-12 15:39 UTC (permalink / raw)
  To: dev

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(-)

diff --git a/lib/librte_eal/linuxapp/eal/eal_pci_uio.c b/lib/librte_eal/linuxapp/eal/eal_pci_uio.c
index e53f06b..54cce08 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__);
-- 
1.9.3

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-02-20 10:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-12 15:39 [dpdk-dev] [PATCH] eal: fix fscanf format mismatch Sergio Gonzalez Monroy
2015-02-19 11:16 ` De Lara Guarch, Pablo
2015-02-20 10:09   ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).