diff options
author | paul <paul> | 2005-03-08 15:16:57 +0000 |
---|---|---|
committer | paul <paul> | 2005-03-08 15:16:57 +0000 |
commit | b45da6f01612e8ec1938cacfe0ea0ef34ad1afca (patch) | |
tree | 670671d335524f7b44bee3e32bdba1a75aecc7df /lib/command.c | |
parent | 3b0c5d9a56560cfbfb1a8f5b9e6cc71025eb5490 (diff) |
2005-03-08 Paul Jakma <paul.jakma@sun.com>
* command.c: (banner_motd_file_cmd) use XSTRDUP/XFREE
* vty.c: (vty_hello) suggestions from Andrew, read by line and
stub out trailling non-printable characters on each line thus
allowing us to specify VTY_NEWLINE to vty_out.
Diffstat (limited to 'lib/command.c')
-rw-r--r-- | lib/command.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/command.c b/lib/command.c index ca1100da..7656f680 100644 --- a/lib/command.c +++ b/lib/command.c @@ -1,5 +1,5 @@ /* - $Id: command.c,v 1.38 2005/03/08 10:43:43 paul Exp $ + $Id: command.c,v 1.39 2005/03/08 15:16:57 paul Exp $ Command interpreter routine for virtual terminal [aka TeletYpe] Copyright (C) 1997, 98, 99 Kunihiro Ishiguro @@ -3409,8 +3409,10 @@ DEFUN (banner_motd_file, "Banner from a file\n" "Filename\n") { - if (host.motdfile) free(host.motdfile); - host.motdfile = strdup(argv[0]); + if (host.motdfile) + XFREE (MTYPE_TMP, host.motdfile); + host.motdfile = XSTRDUP (MTYPE_TMP, argv[0]); + return CMD_SUCCESS; } |