summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_dump.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2017-06-27 20:47:03 +0200
committerQuentin Young <qlyoung@cumulusnetworks.com>2017-06-27 21:04:41 +0200
commitfacfee22f55631992113af5606cf8ade069684b3 (patch)
treeb7ca477d3a90724929f2af749b09bdd6306ae8a6 /ospfd/ospf_dump.c
parentMerge pull request #757 from donaldsharp/extract_sort (diff)
downloadfrr-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 'ospfd/ospf_dump.c')
-rw-r--r--ospfd/ospf_dump.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/ospfd/ospf_dump.c b/ospfd/ospf_dump.c
index f33d92f87..93017aafc 100644
--- a/ospfd/ospf_dump.c
+++ b/ospfd/ospf_dump.c
@@ -963,7 +963,7 @@ DEFUN (debug_ospf_instance_nsm,
int idx_number = 2;
u_short instance = 0;
- VTY_GET_INTEGER ("Instance", instance, argv[idx_number]->arg);
+ instance = strtoul(argv[idx_number]->arg, NULL, 10);
if (!ospf_lookup_instance (instance))
return CMD_SUCCESS;
@@ -1038,7 +1038,7 @@ DEFUN (no_debug_ospf_instance_nsm,
int idx_number = 3;
u_short instance = 0;
- VTY_GET_INTEGER ("Instance", instance, argv[idx_number]->arg);
+ instance = strtoul(argv[idx_number]->arg, NULL, 10);
if (!ospf_lookup_instance (instance))
return CMD_SUCCESS;
@@ -1115,7 +1115,7 @@ DEFUN (debug_ospf_instance_lsa,
int idx_number = 2;
u_short instance = 0;
- VTY_GET_INTEGER ("Instance", instance, argv[idx_number]->arg);
+ instance = strtoul(argv[idx_number]->arg, NULL, 10);
if (!ospf_lookup_instance (instance))
return CMD_SUCCESS;
@@ -1194,7 +1194,7 @@ DEFUN (no_debug_ospf_instance_lsa,
int idx_number = 3;
u_short instance = 0;
- VTY_GET_INTEGER ("Instance", instance, argv[idx_number]->arg);
+ instance = strtoul(argv[idx_number]->arg, NULL, 10);
if (!ospf_lookup_instance (instance))
return CMD_SUCCESS;
@@ -1259,7 +1259,7 @@ DEFUN (debug_ospf_instance_zebra,
int idx_number = 2;
u_short instance = 0;
- VTY_GET_INTEGER ("Instance", instance, argv[idx_number]->arg);
+ instance = strtoul(argv[idx_number]->arg, NULL, 10);
if (!ospf_lookup_instance (instance))
return CMD_SUCCESS;
@@ -1327,7 +1327,7 @@ DEFUN (no_debug_ospf_instance_zebra,
int idx_number = 3;
u_short instance = 0;
- VTY_GET_INTEGER ("Instance", instance, argv[idx_number]->arg);
+ instance = strtoul(argv[idx_number]->arg, NULL, 10);
if (!ospf_lookup_instance (instance))
return CMD_SUCCESS;
@@ -1374,7 +1374,7 @@ DEFUN (debug_ospf_instance_event,
int idx_number = 2;
u_short instance = 0;
- VTY_GET_INTEGER ("Instance", instance, argv[idx_number]->arg);
+ instance = strtoul(argv[idx_number]->arg, NULL, 10);
if (!ospf_lookup_instance (instance))
return CMD_SUCCESS;
@@ -1396,7 +1396,7 @@ DEFUN (no_debug_ospf_instance_event,
int idx_number = 3;
u_short instance = 0;
- VTY_GET_INTEGER ("Instance", instance, argv[idx_number]->arg);
+ instance = strtoul(argv[idx_number]->arg, NULL, 10);
if (!ospf_lookup_instance (instance))
return CMD_SUCCESS;
@@ -1444,7 +1444,7 @@ DEFUN (debug_ospf_instance_nssa,
int idx_number = 2;
u_short instance = 0;
- VTY_GET_INTEGER ("Instance", instance, argv[idx_number]->arg);
+ instance = strtoul(argv[idx_number]->arg, NULL, 10);
if (!ospf_lookup_instance (instance))
return CMD_SUCCESS;
@@ -1466,7 +1466,7 @@ DEFUN (no_debug_ospf_instance_nssa,
int idx_number = 3;
u_short instance = 0;
- VTY_GET_INTEGER ("Instance", instance, argv[idx_number]->arg);
+ instance = strtoul(argv[idx_number]->arg, NULL, 10);
if (!ospf_lookup_instance (instance))
return CMD_SUCCESS;
@@ -1688,7 +1688,7 @@ DEFUN (show_debugging_ospf_instance,
struct ospf *ospf;
u_short instance = 0;
- VTY_GET_INTEGER ("Instance", instance, argv[idx_number]->arg);
+ instance = strtoul(argv[idx_number]->arg, NULL, 10);
if ((ospf = ospf_lookup_instance (instance)) == NULL )
return CMD_SUCCESS;