- for (i = 0; i < exclude_tags_length; i++) {
- status = notmuch_query_add_tag_exclude (query, exclude_tags[i]);
- if (status && status != NOTMUCH_STATUS_IGNORED) {
- print_status_query ("notmuch count", query, status);
- return -1;
+ for (notmuch_config_values_start (exclude_tags);
+ notmuch_config_values_valid (exclude_tags);
+ notmuch_config_values_move_to_next (exclude_tags)) {
+
+ status = notmuch_query_add_tag_exclude (query,
+ notmuch_config_values_get (exclude_tags));
+ if (status && status != NOTMUCH_STATUS_IGNORED) {
+ print_status_query ("notmuch count", query, status);
+ ret = -1;
+ goto DONE;
+ }