X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=utilities%2Fovs-benchmark.c;h=0bb316f30af7df0f73c7d92cf78d28f3b76ee5d2;hb=0ef165ecb57943e17a8ee8270df68ffb8d032e29;hp=6eeedc6180a99fd73bb5a7d3c7afcec511d43c4f;hpb=3815d6c2cdc8d6ccf1f726b2bde9965374a8301c;p=sliver-openvswitch.git diff --git a/utilities/ovs-benchmark.c b/utilities/ovs-benchmark.c index 6eeedc618..0bb316f30 100644 --- 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; - 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_); } - } 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_);