X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=notmuch-dump.c;h=04ecd6a38564c0359bff08d1897714a44fa9f344;hb=6967dcbb025280d33c9cd08502de7a5cdb051ae7;hp=52a882837e41025335bdb6f3a5ac264c9d07ea91;hpb=24ff33082ab1a35c7a31835fba80ade145596422;p=notmuch diff --git a/notmuch-dump.c b/notmuch-dump.c index 52a88283..04ecd6a3 100644 --- a/notmuch-dump.c +++ b/notmuch-dump.c @@ -51,7 +51,9 @@ database_dump_config (notmuch_database_t *notmuch, gzFile output) goto DONE; } - GZPRINTF (output, " %s\n", buffer); + GZPUTS (output, " "); + GZPUTS (output, buffer); + GZPUTS (output, "\n"); } ret = EXIT_SUCCESS; @@ -337,7 +339,7 @@ notmuch_database_dump (notmuch_database_t *notmuch, output = NULL; goto DONE; } else - output = NULL; + output = NULL; if (output_file_name) { ret = rename (tempname, output_file_name); @@ -359,16 +361,12 @@ notmuch_database_dump (notmuch_database_t *notmuch, } int -notmuch_dump_command (notmuch_config_t *config, int argc, char *argv[]) +notmuch_dump_command (unused(notmuch_config_t *config), notmuch_database_t *notmuch, + int argc, char *argv[]) { - notmuch_database_t *notmuch; const char *query_str = NULL; int ret; - if (notmuch_database_open (notmuch_config_get_database_path (config), - NOTMUCH_DATABASE_MODE_READ_WRITE, ¬much)) - return EXIT_FAILURE; - notmuch_exit_if_unmatched_db_uuid (notmuch); const char *output_file_name = NULL;