diff options
| author | Quentin Young <qlyoung@cumulusnetworks.com> | 2017-06-21 03:10:57 +0000 | 
|---|---|---|
| committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2017-06-29 17:31:28 +0000 | 
| commit | 96ade3ed7716c89b8047a1c0ab3377985d461cf8 (patch) | |
| tree | 1c3061738c2c0027612b6cdb3e5d5eccb08587bf /ripngd/ripng_offset.c | |
| parent | 4d5f445750e01467898eee47796e80d808500d56 (diff) | |
*: use vty_outln
Saves 400 lines
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'ripngd/ripng_offset.c')
| -rw-r--r-- | ripngd/ripng_offset.c | 28 | 
1 files changed, 13 insertions, 15 deletions
diff --git a/ripngd/ripng_offset.c b/ripngd/ripng_offset.c index adb3182a5b..51385dd930 100644 --- a/ripngd/ripng_offset.c +++ b/ripngd/ripng_offset.c @@ -125,7 +125,7 @@ ripng_offset_list_set (struct vty *vty, const char *alist,      direct = RIPNG_OFFSET_LIST_OUT;    else      { -      vty_out (vty, "Invalid direction: %s%s", direct_str, VTY_NEWLINE); +      vty_outln (vty, "Invalid direction: %s", direct_str);        return CMD_WARNING;      } @@ -133,7 +133,7 @@ ripng_offset_list_set (struct vty *vty, const char *alist,    metric = atoi (metric_str);    if (metric < 0 || metric > 16)      { -      vty_out (vty, "Invalid metric: %s%s", metric_str, VTY_NEWLINE); +      vty_outln (vty, "Invalid metric: %s", metric_str);        return CMD_WARNING;      } @@ -164,7 +164,7 @@ ripng_offset_list_unset (struct vty *vty, const char *alist,      direct = RIPNG_OFFSET_LIST_OUT;    else      { -      vty_out (vty, "Invalid direction: %s%s", direct_str, VTY_NEWLINE); +      vty_outln (vty, "Invalid direction: %s", direct_str);        return CMD_WARNING;      } @@ -172,7 +172,7 @@ ripng_offset_list_unset (struct vty *vty, const char *alist,    metric = atoi (metric_str);    if (metric < 0 || metric > 16)      { -      vty_out (vty, "Invalid metric: %s%s", metric_str, VTY_NEWLINE); +      vty_outln (vty, "Invalid metric: %s", metric_str);        return CMD_WARNING;      } @@ -196,7 +196,7 @@ ripng_offset_list_unset (struct vty *vty, const char *alist,      }    else      { -      vty_out (vty, "Can't find offset-list%s", VTY_NEWLINE); +      vty_outln (vty, "Can't find offset-list");        return CMD_WARNING;      }    return CMD_SUCCESS; @@ -405,28 +405,26 @@ config_write_ripng_offset_list (struct vty *vty)        if (! offset->ifname)  	{  	  if (offset->direct[RIPNG_OFFSET_LIST_IN].alist_name) -	    vty_out (vty, " offset-list %s in %d%s", +	    vty_outln (vty, " offset-list %s in %d",  		     offset->direct[RIPNG_OFFSET_LIST_IN].alist_name, -		     offset->direct[RIPNG_OFFSET_LIST_IN].metric, -		     VTY_NEWLINE); +		     offset->direct[RIPNG_OFFSET_LIST_IN].metric);  	  if (offset->direct[RIPNG_OFFSET_LIST_OUT].alist_name) -	    vty_out (vty, " offset-list %s out %d%s", +	    vty_outln (vty, " offset-list %s out %d",  		     offset->direct[RIPNG_OFFSET_LIST_OUT].alist_name, -		     offset->direct[RIPNG_OFFSET_LIST_OUT].metric, -		     VTY_NEWLINE); +		     offset->direct[RIPNG_OFFSET_LIST_OUT].metric);  	}        else  	{  	  if (offset->direct[RIPNG_OFFSET_LIST_IN].alist_name) -	    vty_out (vty, " offset-list %s in %d %s%s", +	    vty_outln (vty, " offset-list %s in %d %s",  		     offset->direct[RIPNG_OFFSET_LIST_IN].alist_name,  		     offset->direct[RIPNG_OFFSET_LIST_IN].metric, -		     offset->ifname, VTY_NEWLINE); +		     offset->ifname);  	  if (offset->direct[RIPNG_OFFSET_LIST_OUT].alist_name) -	    vty_out (vty, " offset-list %s out %d %s%s", +	    vty_outln (vty, " offset-list %s out %d %s",  		     offset->direct[RIPNG_OFFSET_LIST_OUT].alist_name,  		     offset->direct[RIPNG_OFFSET_LIST_OUT].metric, -		     offset->ifname, VTY_NEWLINE); +		     offset->ifname);  	}      }  | 
