X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=lib%2Fdatabase.cc;h=726c5a98a02b1e153358c0daff820dac8cac3cc3;hb=0656fb518df3190aebc04ed955c8b3c3cc21759c;hp=5b677d42007fcae27e2632701d2c4073a664e44b;hpb=c50891f449269b7c6f235c510a472be832b95cc1;p=notmuch diff --git a/lib/database.cc b/lib/database.cc index 5b677d42..726c5a98 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -185,7 +185,7 @@ notmuch_status_to_string (notmuch_status_t status) case NOTMUCH_STATUS_TAG_TOO_LONG: return "Tag value is too long (exceeds NOTMUCH_TAG_MAX)"; case NOTMUCH_STATUS_UNBALANCED_FREEZE_THAW: - return "Unblanced number of calls to notmuch_message_freeze/thaw"; + return "Unbalanced number of calls to notmuch_message_freeze/thaw"; default: case NOTMUCH_STATUS_LAST_STATUS: return "Unknown error status value"; @@ -317,7 +317,7 @@ skip_space_and_comments (const char **str) * Returns a newly talloc'ed string belonging to 'ctx'. * * Returns NULL if there is any error parsing the message-id. */ -char * +static char * _parse_message_id (void *ctx, const char *message_id, const char **next) { const char *s, *end; @@ -726,7 +726,8 @@ _notmuch_database_link_message_to_parents (notmuch_database_t *notmuch, /* Carefully avoid adding any self-referential in-reply-to term. */ in_reply_to_message_id = _parse_message_id (message, in_reply_to, NULL); - if (strcmp (in_reply_to_message_id, + if (in_reply_to_message_id && + strcmp (in_reply_to_message_id, notmuch_message_get_message_id (message))) { _notmuch_message_add_term (message, "replyto",