diff options
author | paul <paul> | 2005-03-08 16:00:12 +0000 |
---|---|---|
committer | paul <paul> | 2005-03-08 16:00:12 +0000 |
commit | 220851816a699d9977702ea2b2501d4ede76e898 (patch) | |
tree | 7c7b2a35e838ea6969258ce83f1f56f770972500 /lib/vty.c | |
parent | 9c5d8562f8d24574ba1f43881d47cbc8ffc62027 (diff) |
2005-03-08 Paul Jakma <paul.jakma@sun.com>
* command.c: (no_banner_motd_cmd) use XFREE.
* vty.c: (vty_hello) fix the indentation and comment.
Diffstat (limited to 'lib/vty.c')
-rw-r--r-- | lib/vty.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -220,19 +220,19 @@ vty_hello (struct vty *vty) { FILE *f; char buf[4096]; - + f = fopen (host.motdfile, "r"); if (f) { while (fgets (buf, sizeof (buf), f)) { char *s; - /* work backwards and squash all isspace() chars - * we want nul terminated for vty_out */ - for (s = buf+strlen(buf); (s > buf) && isspace(*(s-1)); s--); - *s = '\0'; - vty_out (vty, "%s%s", buf, VTY_NEWLINE); - } + /* work backwards to ignore trailling isspace() */ + for (s = buf + strlen (buf); (s > buf) && isspace (*(s - 1)); + s--); + *s = '\0'; + vty_out (vty, "%s%s", buf, VTY_NEWLINE); + } fclose (f); } else |