diff options
-rw-r--r-- | lib/command.c | 3 | ||||
-rw-r--r-- | lib/if.c | 2 | ||||
-rw-r--r-- | lib/vty.c | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/lib/command.c b/lib/command.c index ce7a989f..76a45345 100644 --- a/lib/command.c +++ b/lib/command.c @@ -3021,7 +3021,8 @@ DEFUN (config_logmsg, if ((level = level_match(argv[0])) == ZLOG_DISABLED) return CMD_ERR_NO_MATCH; - zlog(NULL, level, ((message = argv_concat(argv, argc, 1)) ? message : "")); + message = argv_concat(argv, argc, 1); + zlog(NULL, level, "%s", message ? message : ""); if (message) XFREE(MTYPE_TMP, message); return CMD_SUCCESS; @@ -664,7 +664,7 @@ connected_log (struct connected *connected, char *str) strncat (logbuf, inet_ntop (p->family, &p->u.prefix, buf, BUFSIZ), BUFSIZ - strlen(logbuf)); } - zlog (NULL, LOG_INFO, logbuf); + zlog (NULL, LOG_INFO, "%s", logbuf); } /* If two connected address has same prefix return 1. */ @@ -250,7 +250,7 @@ vty_hello (struct vty *vty) vty_out (vty, "MOTD file not found%s", VTY_NEWLINE); } else if (host.motd) - vty_out (vty, host.motd); + vty_out (vty, "%s", host.motd); } /* Put out prompt and wait input from user. */ |