X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=utilities%2Fovs-benchmark.c;h=0bb316f30af7df0f73c7d92cf78d28f3b76ee5d2;hb=5de43a606c949dbb74272d5b09627ddd5f64b06b;hp=6eeedc6180a99fd73bb5a7d3c7afcec511d43c4f;hpb=cc36576070df622d0fc7a6e26ce01027e12b5b59;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_);