summaryrefslogtreecommitdiffstats
path: root/babeld/babeld.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 /babeld/babeld.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 'babeld/babeld.c')
-rw-r--r--babeld/babeld.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/babeld/babeld.c b/babeld/babeld.c
index e38c7ed50..e7d4e5137 100644
--- a/babeld/babeld.c
+++ b/babeld/babeld.c
@@ -659,7 +659,7 @@ DEFUN (babel_diversity_factor,
{
int factor;
- VTY_GET_INTEGER_RANGE("factor", factor, argv[2]->arg, 1, 256);
+ factor = strtoul(argv[2]->arg, NULL, 10);
diversity_factor = factor;
return CMD_SUCCESS;
@@ -675,7 +675,7 @@ DEFUN (babel_set_resend_delay,
{
int interval;
- VTY_GET_INTEGER_RANGE("milliseconds", interval, argv[2]->arg, 20, 10 * 0xFFFE);
+ interval = strtoul(argv[2]->arg, NULL, 10);
resend_delay = interval;
return CMD_SUCCESS;
@@ -691,7 +691,7 @@ DEFUN (babel_set_smoothing_half_life,
{
int seconds;
- VTY_GET_INTEGER_RANGE("seconds", seconds, argv[2]->arg, 0, 0xFFFE);
+ seconds = strtoul(argv[2]->arg, NULL, 10);
change_smoothing_half_life(seconds);
return CMD_SUCCESS;