quagga-zlog.patch 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. From fc95186c30884c96543aecfc56cfe5b08774525b Mon Sep 17 00:00:00 2001
  2. From: Christian Hammers <ch@debian.org>
  3. Date: Wed, 23 Mar 2011 13:07:55 +0300
  4. Subject: [PATCH] lib: fix more format warnings (#637)
  5. The following patch was also neccessary to compile.
  6. * command.c: (config_logmsg_cmd) use "%s" format spec
  7. * if.c: (connected_log) ditto
  8. ---
  9. lib/command.c | 2 +-
  10. lib/if.c | 2 +-
  11. 2 files changed, 2 insertions(+), 2 deletions(-)
  12. diff --git a/lib/command.c b/lib/command.c
  13. index 5a13f39..264e0f7 100644
  14. --- a/lib/command.c
  15. +++ b/lib/command.c
  16. @@ -3056,7 +3056,7 @@ DEFUN (config_logmsg,
  17. if ((level = level_match(argv[0])) == ZLOG_DISABLED)
  18. return CMD_ERR_NO_MATCH;
  19. - zlog(NULL, level, ((message = argv_concat(argv, argc, 1)) ? message : ""));
  20. + zlog(NULL, level, "%s", ((message = argv_concat(argv, argc, 1)) ? message : ""));
  21. if (message)
  22. XFREE(MTYPE_TMP, message);
  23. return CMD_SUCCESS;
  24. diff --git a/lib/if.c b/lib/if.c
  25. index b61bdbf..86f754b 100644
  26. --- a/lib/if.c
  27. +++ b/lib/if.c
  28. @@ -664,7 +664,7 @@ connected_log (struct connected *connected, char *str)
  29. strncat (logbuf, inet_ntop (p->family, &p->u.prefix, buf, BUFSIZ),
  30. BUFSIZ - strlen(logbuf));
  31. }
  32. - zlog (NULL, LOG_INFO, logbuf);
  33. + zlog (NULL, LOG_INFO, "%s", logbuf);
  34. }
  35. /* If two connected address has same prefix return 1. */
  36. --
  37. 1.7.4