X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=message-file.c;h=2bd560569dda6aedda058d8942d65e53a4b32f80;hp=fd7e68b48ed8d276890adac7eb8a31fedeb5120b;hb=c7482b4dce114b1c09cbac2f4ef6d0defdb23258;hpb=1ae8c41cdab2f753b61a4966730d90047459cc08 diff --git a/message-file.c b/message-file.c index fd7e68b4..2bd56056 100644 --- a/message-file.c +++ b/message-file.c @@ -125,10 +125,8 @@ notmuch_message_file_restrict_headersv (notmuch_message_file_t *message, { char *header; - if (message->parsing_started ) { - fprintf (stderr, "Error: notmuch_message_file_restrict_headers called after parsing has started\n"); - exit (1); - } + if (message->parsing_started) + INTERNAL_ERROR ("notmuch_message_file_restrict_headers called after parsing has started"); while (1) { header = va_arg (va_headers, char*); @@ -151,7 +149,7 @@ notmuch_message_file_restrict_headers (notmuch_message_file_t *message, ...) notmuch_message_file_restrict_headersv (message, va_headers); } -void +static void copy_header_unfolding (header_value_closure_t *value, const char *chunk) { @@ -164,7 +162,7 @@ copy_header_unfolding (header_value_closure_t *value, chunk++; if (value->len + 1 + strlen (chunk) + 1 > value->size) { - int new_size = value->size; + unsigned int new_size = value->size; if (value->size == 0) new_size = strlen (chunk) + 1; else @@ -305,11 +303,9 @@ notmuch_message_file_get_header (notmuch_message_file_t *message, ! g_hash_table_lookup_extended (message->headers, header_desired, NULL, NULL)) { - fprintf (stderr, - "Internal error: Attempt to get header \"%s\" which was not\n" - "included in call to notmuch_message_file_restrict_headers\n", - header_desired); - exit (1); + INTERNAL_ERROR ("Attempt to get header \"%s\" which was not\n" + "included in call to notmuch_message_file_restrict_headers\n", + header_desired); } return NULL;