diff options
author | Quentin Young <qlyoung@cumulusnetworks.com> | 2017-06-27 20:47:03 +0200 |
---|---|---|
committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2017-06-27 21:04:41 +0200 |
commit | facfee22f55631992113af5606cf8ade069684b3 (patch) | |
tree | b7ca477d3a90724929f2af749b09bdd6306ae8a6 /ospf6d/ospf6_area.c | |
parent | Merge pull request #757 from donaldsharp/extract_sort (diff) | |
download | frr-facfee22f55631992113af5606cf8ade069684b3.tar.xz frr-facfee22f55631992113af5606cf8ade069684b3.zip |
*: remove VTY_GET_*
CLI validates input tokens, so there's no need to do it in handler
functions anymore.
spatch follows
----------------
@getull@
expression v;
expression str;
@@
<...
- VTY_GET_ULL(..., v, str)
+ v = strtoull (str, NULL, 10)
...>
@getul@
expression v;
expression str;
@@
<...
- VTY_GET_ULONG(..., v, str)
+ v = strtoul (str, NULL, 10)
...>
@getintrange@
expression name;
expression v;
expression str;
@@
<...
- VTY_GET_INTEGER_RANGE(name, v, str, ...)
+ v = strtoul (str, NULL, 10)
...>
@getint@
expression v;
expression str;
@@
<...
- VTY_GET_INTEGER(..., v, str)
+ v = strtoul (str, NULL, 10)
...>
@getv4@
expression v;
expression str;
@@
<...
- VTY_GET_IPV4_ADDRESS(..., v, str)
+ inet_aton (str, &v)
...>
@getv4pfx@
expression v;
expression str;
@@
<...
- VTY_GET_IPV4_PREFIX(..., v, str)
+ str2prefix_ipv4 (str, &v)
...>
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'ospf6d/ospf6_area.c')
-rw-r--r-- | ospf6d/ospf6_area.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ospf6d/ospf6_area.c b/ospf6d/ospf6_area.c index deb2c0770..a4996018a 100644 --- a/ospf6d/ospf6_area.c +++ b/ospf6d/ospf6_area.c @@ -480,7 +480,7 @@ DEFUN (area_range, } else { - VTY_GET_INTEGER_RANGE ("cost", cost, argv[5]->arg, 0, OSPF_LS_INFINITY); + cost = strtoul(argv[5]->arg, NULL, 10); UNSET_FLAG (range->flag, OSPF6_ROUTE_DO_NOT_ADVERTISE); } } |