From: Aaron Campbell <aaron@arbor.net>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] eal: clear errno before calling strtoull() to parse base_virtaddr
Date: Thu, 19 Jun 2014 11:42:36 -0400 [thread overview]
Message-ID: <1403192557-10905-1-git-send-email-aaron@arbor.net> (raw)
Must reset errno to zero before calling strtoull(), else on success it
could be any arbitrary value from past errors.
Signed-off-by: Aaron Campbell <aaron@arbor.net>
---
lib/librte_eal/linuxapp/eal/eal.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c
index 6994303..d204387 100644
--- a/lib/librte_eal/linuxapp/eal/eal.c
+++ b/lib/librte_eal/linuxapp/eal/eal.c
@@ -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 */
--
1.8.3.2
next reply other threads:[~2014-06-19 15:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-19 15:42 Aaron Campbell [this message]
2014-06-19 15:46 ` Burakov, Anatoly
2014-06-19 15:50 ` Aaron Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1403192557-10905-1-git-send-email-aaron@arbor.net \
--to=aaron@arbor.net \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).