From facfee22f55631992113af5606cf8ade069684b3 Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Tue, 27 Jun 2017 18:47:03 +0000 Subject: *: 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 --- ospf6d/ospf6_top.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ospf6d/ospf6_top.c') diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c index dfda06678..c0794d863 100644 --- a/ospf6d/ospf6_top.c +++ b/ospf6d/ospf6_top.c @@ -417,7 +417,7 @@ DEFUN (ospf6_timers_lsa, int idx_number = 3; unsigned int minarrival; - VTY_GET_INTEGER ("LSA min-arrival", minarrival, argv[idx_number]->arg); + minarrival = strtoul(argv[idx_number]->arg, NULL, 10); ospf->lsa_minarrival = minarrival; return CMD_SUCCESS; @@ -438,7 +438,7 @@ DEFUN (no_ospf6_timers_lsa, if (argc == 5) { - VTY_GET_INTEGER ("LSA min-arrival", minarrival, argv[idx_number]->arg); + minarrival = strtoul(argv[idx_number]->arg, NULL, 10); if (ospf->lsa_minarrival != minarrival || minarrival == OSPF_MIN_LS_ARRIVAL) -- cgit v1.2.3