_notmuch_database_linke_message: Fix error-status propagation.

The _notmuch_database_link_message_to_parents function was void
in an earlier draft. Now, ensure that we don't miss any error
return value from it.
This commit is contained in:
Carl Worth 2009-10-25 15:01:20 -07:00
parent a360670c03
commit be9e3ee313

View file

@ -798,20 +798,24 @@ _notmuch_database_link_message (notmuch_database_t *notmuch,
notmuch_message_t *message, notmuch_message_t *message,
notmuch_message_file_t *message_file) notmuch_message_file_t *message_file)
{ {
notmuch_status_t ret = NOTMUCH_STATUS_SUCCESS; notmuch_status_t status;
const char *thread_id = NULL; const char *thread_id = NULL;
_notmuch_database_link_message_to_parents (notmuch, message, status = _notmuch_database_link_message_to_parents (notmuch, message,
message_file, message_file,
&thread_id); &thread_id);
if (status)
return status;
ret = _notmuch_database_link_message_to_children (notmuch, message, status = _notmuch_database_link_message_to_children (notmuch, message,
&thread_id); &thread_id);
if (status)
return status;
if (thread_id == NULL) if (thread_id == NULL)
_notmuch_message_ensure_thread_id (message); _notmuch_message_ensure_thread_id (message);
return ret; return NOTMUCH_STATUS_SUCCESS;
} }
notmuch_status_t notmuch_status_t