git://git.onelab.eu
/
sliver-openvswitch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Prepare for post-2.2.0 (2.2.90).
[sliver-openvswitch.git]
/
utilities
/
ovs-benchmark.c
diff --git
a/utilities/ovs-benchmark.c
b/utilities/ovs-benchmark.c
index
6eeedc6
..
0bb316f
100644
(file)
--- a/
utilities/ovs-benchmark.c
+++ b/
utilities/ovs-benchmark.c
@@
-101,11
+101,11
@@
parse_target(const char *s_, struct in_addr *addr,
*min = *max = 0;
if (colon && colon[1] != '\0') {
const char *ports = colon + 1;
*min = *max = 0;
if (colon && colon[1] != '\0') {
const char *ports = colon + 1;
- if (
sscanf(ports, "%hu-%hu", min, max) == 2
) {
+ if (
ovs_scan(ports, "%hu-%hu", min, max)
) {
if (*min > *max) {
ovs_fatal(0, "%s: minimum is greater than maximum", s_);
}
if (*min > *max) {
ovs_fatal(0, "%s: minimum is greater than maximum", s_);
}
- } else if (
sscanf(ports, "%hu", min) == 1
) {
+ } else if (
ovs_scan(ports, "%hu", min)
) {
*max = *min;
} else {
ovs_fatal(0, "%s: number or range expected", s_);
*max = *min;
} else {
ovs_fatal(0, "%s: number or range expected", s_);