X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch-show.c;h=95427d4fd3096f294714b8a1b4fb069f64fc0503;hp=aa9093240690a3ec2558fb1604108fd69208309c;hb=9d5f73db7a948ddbed710309e7dc2f7d65d0f7d4;hpb=67da35222c73672d61050c0561757c0b739e9195 diff --git a/notmuch-show.c b/notmuch-show.c index aa909324..95427d4f 100644 --- a/notmuch-show.c +++ b/notmuch-show.c @@ -26,10 +26,7 @@ format_part_text (const void *ctx, mime_node_t *node, int indent, const notmuch_show_params_t *params); static const notmuch_show_format_t format_text = { - .message_set_start = "", .part = format_part_text, - .message_set_sep = "", - .message_set_end = "" }; static notmuch_status_t @@ -48,10 +45,7 @@ format_part_mbox (const void *ctx, mime_node_t *node, int indent, const notmuch_show_params_t *params); static const notmuch_show_format_t format_mbox = { - .message_set_start = "", .part = format_part_mbox, - .message_set_sep = "", - .message_set_end = "" }; static notmuch_status_t @@ -60,10 +54,7 @@ format_part_raw (unused (const void *ctx), mime_node_t *node, unused (const notmuch_show_params_t *params)); static const notmuch_show_format_t format_raw = { - .message_set_start = "", .part = format_part_raw, - .message_set_sep = "", - .message_set_end = "" }; static const char * @@ -1090,9 +1081,8 @@ notmuch_show_command (void *ctx, unused (int argc), unused (char *argv[])) return 1; } - notmuch = notmuch_database_open (notmuch_config_get_database_path (config), - NOTMUCH_DATABASE_MODE_READ_ONLY); - if (notmuch == NULL) + if (notmuch_database_open (notmuch_config_get_database_path (config), + NOTMUCH_DATABASE_MODE_READ_ONLY, ¬much)) return 1; query = notmuch_query_create (notmuch, query_string); @@ -1126,7 +1116,7 @@ notmuch_show_command (void *ctx, unused (int argc), unused (char *argv[])) } notmuch_query_destroy (query); - notmuch_database_close (notmuch); + notmuch_database_destroy (notmuch); if (params.cryptoctx) g_object_unref(params.cryptoctx);