diff options
author | Dmitry Gromada <dmitry.gromada@nexenta.com> | 2017-02-08 21:24:41 +0300 |
---|---|---|
committer | Dan McDonald <danmcd@mnx.io> | 2022-10-11 16:53:58 -0400 |
commit | 1261b05561db859f9c9c1418718a0a9a2930e0cb (patch) | |
tree | f0148a9404e73acc67f6840103690b8f48901389 | |
parent | 670f080b72593a4a43a509cd4a020ffe8a6484a6 (diff) | |
download | illumos-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.c | 1 |
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)) |