X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fnotify_email.c;h=aaa165abdef9b0998ef7211d04b4f125df7af14c;hb=2b4445ea9b4b978468d75864f98e8137ba628dec;hp=d486a618e6d4673c023cb19b4a91843067895ddb;hpb=2079ee1517e34de372f58e7e2267ad5c71a8a41f;p=collectd.git diff --git a/src/notify_email.c b/src/notify_email.c index d486a618..aaa165ab 100644 --- a/src/notify_email.c +++ b/src/notify_email.c @@ -204,7 +204,6 @@ static int notify_email_notification(const notification_t *n, user_data_t __attribute__((unused)) * user_data) { - time_t tt; struct tm timestamp_tm; char timestamp_str[64]; @@ -226,8 +225,7 @@ static int notify_email_notification(const notification_t *n, (email_subject == NULL) ? DEFAULT_SMTP_SUBJECT : email_subject, severity, n->host); - tt = CDTIME_T_TO_TIME_T(n->time); - localtime_r(&tt, ×tamp_tm); + localtime_r(&CDTIME_T_TO_TIME_T(n->time), ×tamp_tm); strftime(timestamp_str, sizeof(timestamp_str), "%Y-%m-%d %H:%M:%S", ×tamp_tm); timestamp_str[sizeof(timestamp_str) - 1] = '\0'; @@ -292,5 +290,3 @@ void module_register(void) { plugin_register_notification("notify_email", notify_email_notification, /* user_data = */ NULL); } /* void module_register (void) */ - -/* vim: set sw=2 sts=2 ts=8 et : */