[evolution-data-server] Correct false runtime warning from camel_folder_info_build()
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Correct false runtime warning from camel_folder_info_build()
- Date: Thu, 14 Jun 2018 09:16:26 +0000 (UTC)
commit 7debd9224dc5fa6e637d62b320482a418404faf8
Author: Milan Crha <mcrha redhat com>
Date: Thu Jun 14 11:17:20 2018 +0200
Correct false runtime warning from camel_folder_info_build()
The folders->pdata can be NULL when folders->len is 0, thus do not
claim the runtime warning when there had been passed no folders.
src/camel/camel-store.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/camel/camel-store.c b/src/camel/camel-store.c
index 2e530924f..66567e124 100644
--- a/src/camel/camel-store.c
+++ b/src/camel/camel-store.c
@@ -1172,12 +1172,12 @@ camel_folder_info_build (GPtrArray *folders,
gchar *p, *pname;
gint i, nlen;
- if (!folders) {
+ if (!folders || !folders->len) {
g_warn_if_fail (folders != NULL);
return NULL;
}
- if (!folders->pdata || !folders->len) {
+ if (!folders->pdata) {
g_warn_if_fail (folders->pdata != NULL);
return NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]