From: Christian Franke <[email protected]>
Signed-off-by: Christian Franke <[email protected]>
---
lib/log.h | 3 ++-
lib/vty.c | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/log.h b/lib/log.h
index 514884c..7aa0896 100644
--- a/lib/log.h
+++ b/lib/log.h
@@ -186,6 +186,7 @@ extern void zlog_backtrace_sigsafe(int priority, void
*program_counter);
It caches the most recent localtime result and can therefore
avoid multiple calls within the same second. If buflen is too small,
*buf will be set to '\0', and 0 will be returned. */
+#define QUAGGA_TIMESTAMP_LEN 40
extern size_t quagga_timestamp(int timestamp_precision /* # subsecond digits
*/,
char *buf, size_t buflen);
@@ -196,7 +197,7 @@ struct timestamp_control {
size_t len; /* length of rendered timestamp */
int precision; /* configuration parameter */
int already_rendered; /* should be initialized to 0 */
- char buf[40]; /* will contain the rendered timestamp */
+ char buf[QUAGGA_TIMESTAMP_LEN]; /* will contain the rendered timestamp
*/
};
/* Defines for use in command construction: */
diff --git a/lib/vty.c b/lib/vty.c
index e4510f8..e25d073 100644
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -209,7 +209,7 @@ vty_log_out (struct vty *vty, const char *level, const char
*proto_str,
void
vty_time_print (struct vty *vty, int cr)
{
- char buf [25];
+ char buf[QUAGGA_TIMESTAMP_LEN];
if (quagga_timestamp(0, buf, sizeof(buf)) == 0)
{
--
2.8.0
_______________________________________________
Quagga-dev mailing list
[email protected]
https://lists.quagga.net/mailman/listinfo/quagga-dev