diff options
| author | Christian Hopps <chopps@labn.net> | 2023-05-02 17:17:51 -0400 |
|---|---|---|
| committer | Christian Hopps <chopps@labn.net> | 2023-05-04 14:47:55 -0400 |
| commit | d31d24c4889dfd09c9a449cc62bea41bcd0ded2e (patch) | |
| tree | eb4c29c39e5ded9688ab58c108eafbff625fb46c /mgmtd/mgmt.h | |
| parent | 27797fec2cb76c7a5526b34ca8494ec72a633f29 (diff) | |
mgmtd: simplify commit id to just be a timeval string
Also fixes coverity warning
Signed-off-by: Christian Hopps <chopps@labn.net>
Diffstat (limited to 'mgmtd/mgmt.h')
| -rw-r--r-- | mgmtd/mgmt.h | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/mgmtd/mgmt.h b/mgmtd/mgmt.h index 83353e8171..603296bb38 100644 --- a/mgmtd/mgmt.h +++ b/mgmtd/mgmt.h @@ -108,16 +108,4 @@ extern void mgmt_master_init(struct event_loop *master, const int buffer_size); extern void mgmt_init(void); extern void mgmt_vty_init(void); -static inline char *mgmt_realtime_to_string(struct timeval *tv, char *buf, - size_t sz) -{ - struct tm tm; - size_t n; - - localtime_r((const time_t *)&tv->tv_sec, &tm); - n = strftime(buf, sz, "%Y-%m-%dT%H:%M:%S", &tm); - snprintf(&buf[n], sz - n, ",%06u000", (unsigned int)tv->tv_usec); - return buf; -} - #endif /* _FRR_MGMTD_H */ |
