diff options
author | Jani Nikula <jani@nikula.org> | 2013-11-03 14:24:45 +0200 |
---|---|---|
committer | David Bremner <david@tethera.net> | 2013-11-07 06:46:42 -0400 |
commit | 180dba66e47a5257b2cdf2f1ceb59cc8fa5a69d4 (patch) | |
tree | 3cc88a821018e363d2805df39c7b3920c7524c71 /notmuch-compact.c | |
parent | 35ca5feb28a6e52851ba61ea63478ade40991558 (diff) |
lib: add closure parameter to compact status update callback
This provides much more flexibility for the caller.
Diffstat (limited to 'notmuch-compact.c')
-rw-r--r-- | notmuch-compact.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/notmuch-compact.c b/notmuch-compact.c index bfda40e3..ee7afcf6 100644 --- a/notmuch-compact.c +++ b/notmuch-compact.c @@ -20,10 +20,8 @@ #include "notmuch-client.h" -void status_update_cb (const char *msg); - -void -status_update_cb (const char *msg) +static void +status_update_cb (const char *msg, unused (void *closure)) { printf("%s\n", msg); } @@ -38,7 +36,7 @@ notmuch_compact_command (notmuch_config_t *config, notmuch_status_t ret; printf ("Compacting database...\n"); - ret = notmuch_database_compact (path, backup_path, status_update_cb); + ret = notmuch_database_compact (path, backup_path, status_update_cb, NULL); if (ret) { fprintf (stderr, "Compaction failed: %s\n", notmuch_status_to_string(ret)); } else { |