aboutsummaryrefslogtreecommitdiff
path: root/lib/message-file.c
diff options
context:
space:
mode:
authorJani Nikula <jani@nikula.org>2017-10-07 11:44:05 +0300
committerDavid Bremner <david@tethera.net>2017-10-09 22:27:16 -0300
commit008a5e92eb157e2bb8622cb2fbf644deba5ba4b4 (patch)
tree12c403226e076d230ac54fa59c98726fcafefb38 /lib/message-file.c
parent0f314c0c99befea599a68bea51d759b4133efef6 (diff)
lib: convert notmuch_bool_t to stdbool internally
C99 stdbool turned 18 this year. There really is no reason to use our own, except in the library interface for backward compatibility. Convert the lib internally to stdbool.
Diffstat (limited to 'lib/message-file.c')
-rw-r--r--lib/message-file.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/message-file.c b/lib/message-file.c
index b90df305..8f0dbbda 100644
--- a/lib/message-file.c
+++ b/lib/message-file.c
@@ -104,16 +104,16 @@ _notmuch_message_file_close (notmuch_message_file_t *message)
talloc_free (message);
}
-static notmuch_bool_t
+static bool
_is_mbox (FILE *file)
{
char from_buf[5];
- notmuch_bool_t ret = FALSE;
+ bool ret = false;
/* Is this mbox? */
if (fread (from_buf, sizeof (from_buf), 1, file) == 1 &&
strncmp (from_buf, "From ", 5) == 0)
- ret = TRUE;
+ ret = true;
rewind (file);
@@ -127,7 +127,7 @@ _notmuch_message_file_parse (notmuch_message_file_t *message)
GMimeParser *parser;
notmuch_status_t status = NOTMUCH_STATUS_SUCCESS;
static int initialized = 0;
- notmuch_bool_t is_mbox;
+ bool is_mbox;
if (message->message)
return NOTMUCH_STATUS_SUCCESS;
@@ -147,7 +147,7 @@ _notmuch_message_file_parse (notmuch_message_file_t *message)
stream = g_mime_stream_file_new (message->file);
/* We'll own and fclose the FILE* ourselves. */
- g_mime_stream_file_set_owner (GMIME_STREAM_FILE (stream), FALSE);
+ g_mime_stream_file_set_owner (GMIME_STREAM_FILE (stream), false);
parser = g_mime_parser_new_with_stream (stream);
g_mime_parser_set_scan_from (parser, is_mbox);