[balsa] mailbox: Ensure gboolean return value
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa] mailbox: Ensure gboolean return value
- Date: Sun, 12 Jan 2020 23:19:42 +0000 (UTC)
commit 266cf2c433c2daa8201be0ab7dd3cb55f4eb2f8b
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Sun Jan 12 17:53:55 2020 -0500
mailbox: Ensure gboolean return value
Ensure that a function declared as returning gboolean returns only
either TRUE or FALSE.
libbalsa/mailbox.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/libbalsa/mailbox.c b/libbalsa/mailbox.c
index ed3e0f250..7efaba595 100644
--- a/libbalsa/mailbox.c
+++ b/libbalsa/mailbox.c
@@ -4803,7 +4803,7 @@ libbalsa_mailbox_get_msg_tree_changed(LibBalsaMailbox * mailbox)
g_return_val_if_fail(LIBBALSA_IS_MAILBOX(mailbox), FALSE);
- return priv->msg_tree_changed;
+ return priv->msg_tree_changed != 0;
}
LibBalsaMailboxState
@@ -4863,7 +4863,7 @@ libbalsa_mailbox_get_readonly(LibBalsaMailbox * mailbox)
g_return_val_if_fail(LIBBALSA_IS_MAILBOX(mailbox), FALSE);
- return priv->readonly;
+ return priv->readonly != 0;
}
const gchar *
@@ -4883,7 +4883,7 @@ libbalsa_mailbox_get_has_unread_messages(LibBalsaMailbox * mailbox)
g_return_val_if_fail(LIBBALSA_IS_MAILBOX(mailbox), FALSE);
- return priv->has_unread_messages;
+ return priv->has_unread_messages != 0;
}
gboolean
@@ -4893,7 +4893,7 @@ libbalsa_mailbox_get_messages_loaded(LibBalsaMailbox * mailbox)
g_return_val_if_fail(LIBBALSA_IS_MAILBOX(mailbox), FALSE);
- return priv->messages_loaded;
+ return priv->messages_loaded != 0;
}
gboolean
@@ -4903,7 +4903,7 @@ libbalsa_mailbox_get_messages_threaded(LibBalsaMailbox * mailbox)
g_return_val_if_fail(LIBBALSA_IS_MAILBOX(mailbox), FALSE);
- return priv->messages_threaded;
+ return priv->messages_threaded != 0;
}
/*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]