diff options
author | Austin Clements <amdragon@MIT.EDU> | 2012-04-30 12:25:33 -0400 |
---|---|---|
committer | David Bremner <bremner@debian.org> | 2012-05-05 10:11:57 -0300 |
commit | 5fddc07dc31481453c1af186bf7da241c00cdbf1 (patch) | |
tree | dfbe4bbabbac3b4c095c7528acdbcf54a2e3c78d /notmuch-dump.c | |
parent | 1579fb334e0bbc42d5ae7692b184127f43ed7027 (diff) |
lib/cli: Make notmuch_database_open return a status code
It has been a long-standing issue that notmuch_database_open doesn't
return any indication of why it failed. This patch changes its
prototype to return a notmuch_status_t and set an out-argument to the
database itself, like other functions that return both a status and an
object.
In the interest of atomicity, this also updates every use in the CLI
so that notmuch still compiles. Since this patch does not update the
bindings, the Python bindings test fails.
Diffstat (limited to 'notmuch-dump.c')
-rw-r--r-- | notmuch-dump.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/notmuch-dump.c b/notmuch-dump.c index 71ab0ea7..37432142 100644 --- a/notmuch-dump.c +++ b/notmuch-dump.c @@ -36,9 +36,8 @@ notmuch_dump_command (unused (void *ctx), int argc, char *argv[]) if (config == NULL) 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; char *output_file_name = NULL; |