diff options
| author | David Bremner <david@tethera.net> | 2017-05-04 08:48:44 -0400 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2017-07-14 17:58:09 -0300 |
| commit | 67dbd24ece883e9cb0258fce289e40ca276b729d (patch) | |
| tree | 6c0c67d663156dbf2966a39061081e553c967645 /notmuch-show.c | |
| parent | a58c75fdf6120aa3861e95a4a61fa268dee6a690 (diff) | |
cli: replace use of g_mime_message_get_date_as_string
This function goes away in gmime-3.0. Also, the memory management is
apparently error prone, witness the memory leak in notmuch-reply.
Diffstat (limited to 'notmuch-show.c')
| -rw-r--r-- | notmuch-show.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/notmuch-show.c b/notmuch-show.c index 084b7dab..78d46f1e 100644 --- a/notmuch-show.c +++ b/notmuch-show.c @@ -204,7 +204,6 @@ format_headers_sprinter (sprinter_t *sp, GMimeMessage *message, InternetAddressList *recipients; char *recipients_string; const char *reply_to_string; - char *date_string; sp->begin_map (sp); @@ -252,9 +251,7 @@ format_headers_sprinter (sprinter_t *sp, GMimeMessage *message, sp->string (sp, g_mime_object_get_header (GMIME_OBJECT (message), "References")); } else { sp->map_key (sp, "Date"); - date_string = g_mime_message_get_date_as_string (message); - sp->string (sp, date_string); - g_free (date_string); + sp->string (sp, g_mime_message_get_date_string (sp, message)); } sp->end (sp); @@ -532,9 +529,8 @@ format_part_text (const void *ctx, sprinter_t *sp, mime_node_t *node, if (recipients_string) g_mime_stream_printf (stream, "Cc: %s\n", recipients_string); g_free (recipients_string); - date_string = g_mime_message_get_date_as_string (message); + date_string = g_mime_message_get_date_string (node, message); g_mime_stream_printf (stream, "Date: %s\n", date_string); - g_free (date_string); g_mime_stream_printf (stream, "\fheader}\n"); g_mime_stream_printf (stream, "\fbody{\n"); |
