2005-01-29 Andrew J. Schorr <ajschorr@alumni.princeton.edu>

	* buffer.h: Fix comment on buffer_getstr to reflect that it now
	  uses XMALLOC.
	* buffer.c: (buffer_getstr) Use XMALLOC(MTYPE_TMP) instead of malloc.
	* filter.c: (access_list_remark,ipv6_access_list_remark) Use
	  argv_concat instead of buffer_getstr.
	* if.c: (interface_desc) Use argv_concat instead of buffer_getstr.
	* plist.c: (ip_prefix_list_description,ipv6_prefix_list_description)
	  Use argv_concat instead of buffer_getstr.
	* bgp_filter.c: (ip_as_path,no_ip_as_path) Use argv_concat instead
	  of buffer_getstr.
	* bgp_route.c: (bgp_show_regexp) Fix memory leak: need to free string
	  returned by buffer_getstr.
	  (bgp_show_community) Must use XFREE instead of free on string
	  returned by buffer_getstr.
	* bgp_routemap.c: (set_community) Must use XFREE instead of free
	  on string returned by buffer_getstr.
	* bgp_vty.c: (neighbor_description) Use argv_concat instead of
	  buffer_getstr.
diff --git a/lib/plist.c b/lib/plist.c
index 3520f82..5e2edd2 100644
--- a/lib/plist.c
+++ b/lib/plist.c
@@ -1561,8 +1561,6 @@
        "Up to 80 characters describing this prefix-list\n")
 {
   struct prefix_list *plist;
-  struct buffer *b;
-  int i;
 
   plist = prefix_list_get (AFI_IP, argv[0]);
   
@@ -1571,19 +1569,7 @@
       XFREE (MTYPE_TMP, plist->desc);
       plist->desc = NULL;
     }
-
-  /* Below is description get codes. */
-  b = buffer_new (1024);
-  for (i = 1; i < argc; i++)
-    {
-      buffer_putstr (b, argv[i]);
-      buffer_putc (b, ' ');
-    }
-  buffer_putc (b, '\0');
-
-  plist->desc = buffer_getstr (b);
-
-  buffer_free (b);
+  plist->desc = argv_concat(argv, argc, 1);
 
   return CMD_SUCCESS;
 }       
@@ -2171,8 +2157,6 @@
        "Up to 80 characters describing this prefix-list\n")
 {
   struct prefix_list *plist;
-  struct buffer *b;
-  int i;
 
   plist = prefix_list_get (AFI_IP6, argv[0]);
   
@@ -2181,19 +2165,7 @@
       XFREE (MTYPE_TMP, plist->desc);
       plist->desc = NULL;
     }
-
-  /* Below is description get codes. */
-  b = buffer_new (1024);
-  for (i = 1; i < argc; i++)
-    {
-      buffer_putstr (b, argv[i]);
-      buffer_putc (b, ' ');
-    }
-  buffer_putc (b, '\0');
-
-  plist->desc = buffer_getstr (b);
-
-  buffer_free (b);
+  plist->desc = argv_concat(argv, argc, 1);
 
   return CMD_SUCCESS;
 }