X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=lib%2Fmessage-property.cc;h=d5afa30c8e2a3e4d74d50a02efa15659febafbaf;hb=cc180507b03d9826c92d48ee91dbd9bb5f15cd56;hp=710ba0460665c6e506a2efe24b2a12c242321980;hpb=c3a683299d4c27d6eadaacf4fb516f73a6c69fc3;p=notmuch diff --git a/lib/message-property.cc b/lib/message-property.cc index 710ba046..d5afa30c 100644 --- a/lib/message-property.cc +++ b/lib/message-property.cc @@ -43,11 +43,13 @@ notmuch_message_count_properties (notmuch_message_t *message, const char *key, u return NOTMUCH_STATUS_NULL_POINTER; notmuch_string_map_t *map; + map = _notmuch_message_property_map (message); if (! map) return NOTMUCH_STATUS_NULL_POINTER; notmuch_string_map_iterator_t *matcher = _notmuch_string_map_iterator_create (map, key, true); + if (! matcher) return NOTMUCH_STATUS_OUT_OF_MEMORY; @@ -115,7 +117,7 @@ notmuch_status_t _notmuch_message_remove_all_properties (notmuch_message_t *message, const char *key, bool prefix) { notmuch_status_t status; - const char * term_prefix; + const char *term_prefix; status = _notmuch_database_ensure_writable (notmuch_message_get_database (message)); if (status) @@ -150,6 +152,7 @@ notmuch_message_properties_t * notmuch_message_get_properties (notmuch_message_t *message, const char *key, notmuch_bool_t exact) { notmuch_string_map_t *map; + map = _notmuch_message_property_map (message); return _notmuch_string_map_iterator_create (map, key, exact); }