]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: fix more format warnings (#637)
authorChristian Hammers <ch@debian.org>
Wed, 23 Mar 2011 10:07:55 +0000 (13:07 +0300)
committerDenis Ovsienko <infrastation@yandex.ru>
Wed, 3 Aug 2011 09:09:51 +0000 (13:09 +0400)
The following patch was also neccessary to compile.

* command.c: (config_logmsg_cmd) use "%s" format spec
* if.c: (connected_log) ditto

lib/command.c
lib/if.c

index 45eb9e31a22dad171d0ccb8ce89b25480948e6a4..ebb50b40d45acf8b4e5da7a29313fa80cfa2d116 100644 (file)
@@ -3054,7 +3054,7 @@ 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 : ""));
+  zlog(NULL, level, "%s", ((message = argv_concat(argv, argc, 1)) ? message : ""));
   if (message)
     XFREE(MTYPE_TMP, message);
   return CMD_SUCCESS;
index e31071164cbceba91e635348dea12b7488763422..d14cfb939633eba67c7aeda9221a72f420d8728d 100644 (file)
--- a/lib/if.c
+++ b/lib/if.c
@@ -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. */