summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Gromada <dmitry.gromada@nexenta.com>2017-02-08 21:24:41 +0300
committerDan McDonald <danmcd@mnx.io>2022-10-11 16:53:58 -0400
commit1261b05561db859f9c9c1418718a0a9a2930e0cb (patch)
treef0148a9404e73acc67f6840103690b8f48901389
parent670f080b72593a4a43a509cd4a020ffe8a6484a6 (diff)
downloadillumos-gate-1261b05561db859f9c9c1418718a0a9a2930e0cb.tar.gz
15069 dladm_str2bw() does not reset errno which is checked after string conversion
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com> Reviewed by: Alex Deiter <alex.deiter@nexenta.com> Reviewed by: Jean McCormack <jean.mccormack@nexenta.com> Reviewed by: Jason King <jason.brian.king+illumos@gmail.com> Reviewed by: Marco van Wieringen <mvw@planets.elm.net> Approved by: Dan McDonald <danmcd@mnx.io>
-rw-r--r--usr/src/lib/libdladm/common/libdladm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/usr/src/lib/libdladm/common/libdladm.c b/usr/src/lib/libdladm/common/libdladm.c
index c2533469a7..b7ea20ebac 100644
--- a/usr/src/lib/libdladm/common/libdladm.c
+++ b/usr/src/lib/libdladm/common/libdladm.c
@@ -527,6 +527,7 @@ dladm_str2bw(char *oarg, uint64_t *bw)
int64_t n;
int mult = 1;
+ errno = 0;
n = strtoull(oarg, &endp, 10);
if ((errno != 0) || (strlen(endp) > 1))