From 75f1999b2c42042725b9ee782e135b0300cc384e Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 9 Dec 2009 17:28:49 +0000 Subject: vty: fix warnings Gcc now warns if function that takes printf style formatting is passed a non-constant string. This avoid issues when a format character is entered in some command. Signed-off-by: David Lamparter --- lib/command.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/command.c') 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; -- cgit v1.2.3