Browse Source

lib: fix more format warnings (#637)

The following patch was also neccessary to compile.

* command.c: (config_logmsg_cmd) use "%s" format spec
* if.c: (connected_log) ditto
Christian Hammers 9 years ago
parent
commit
fc95186c30
2 changed files with 2 additions and 2 deletions
  1. 1 1
      lib/command.c
  2. 1 1
      lib/if.c

+ 1 - 1
lib/command.c

@@ -3056,7 +3056,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;

+ 1 - 1
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. */