diff options
author | Christian Franke <nobody@nowhere.ws> | 2016-04-07 21:43:43 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-04-08 02:32:53 +0200 |
commit | ae616d60b5d6469fd9eca61e85dff17b05f67694 (patch) | |
tree | f61b431e34e2cefe80e1be0f461e96e4b05a9010 /lib/log.h | |
parent | debian: Add ability to call reload from systemctl (diff) | |
download | frr-ae616d60b5d6469fd9eca61e85dff17b05f67694.tar.xz frr-ae616d60b5d6469fd9eca61e85dff17b05f67694.zip |
lib: use constant to replace magic value for length of quagga_timestamp
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Acked-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
Diffstat (limited to 'lib/log.h')
-rw-r--r-- | lib/log.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -171,6 +171,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); @@ -181,7 +182,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: */ |