summaryrefslogtreecommitdiff
path: root/lib/if.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/if.c')
-rw-r--r--lib/if.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/lib/if.c b/lib/if.c
index c7ced18e..7385ff6e 100644
--- a/lib/if.c
+++ b/lib/if.c
@@ -453,27 +453,15 @@ DEFUN (interface_desc,
"Interface specific description\n"
"Characters describing this interface\n")
{
- int i;
struct interface *ifp;
- struct buffer *b;
if (argc == 0)
return CMD_SUCCESS;
ifp = vty->index;
if (ifp->desc)
- XFREE (0, ifp->desc);
-
- b = buffer_new (1024);
- for (i = 0; i < argc; i++)
- {
- buffer_putstr (b, argv[i]);
- buffer_putc (b, ' ');
- }
- buffer_putc (b, '\0');
-
- ifp->desc = buffer_getstr (b);
- buffer_free (b);
+ XFREE (MTYPE_TMP, ifp->desc);
+ ifp->desc = argv_concat(argv, argc, 0);
return CMD_SUCCESS;
}