[PATCH 1/6] lib/cli: Make notmuch_database_open return a status code

David Bremner david at tethera.net
Mon Apr 30 04:39:32 PDT 2012


I have two questions, both of which might have been settled previously.

>  
> -    return notmuch;
> +    *database = notmuch;
> +    return status;
>  }

Should we check database is non-NULL here?

> diff --git a/notmuch-count.c b/notmuch-count.c
> index 9c2ad7b..2f98128 100644
> --- a/notmuch-count.c
> +++ b/notmuch-count.c

> +    if (notmuch_database_open (notmuch_config_get_database_path (config),
> +			       NOTMUCH_DATABASE_MODE_READ_ONLY, &notmuch))

Is it OK to rely on NOTMUCH_STATUS_SUCCESS==0 ?

d


More information about the notmuch mailing list