eal: fix option --base-virtaddr
authorPablo de Lara <pablo.de.lara.guarch@intel.com>
Thu, 19 Jun 2014 15:35:22 +0000 (16:35 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Thu, 19 Jun 2014 15:53:59 +0000 (17:53 +0200)
When parsing EAL option --base-virtaddr
errno was not being set to 0 before calling strtoull,
therefore function might fail unnecesarily.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Signed-off-by: Aaron Campbell <aaron@arbor.net>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
lib/librte_eal/linuxapp/eal/eal.c

index 6994303..d204387 100644 (file)
@@ -562,6 +562,7 @@ eal_parse_base_virtaddr(const char *arg)
        char *end;
        uint64_t addr;
 
+       errno = 0;
        addr = strtoull(arg, &end, 16);
 
        /* check for errors */