[evolution-data-server/gnome-3-28] 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/gnome-3-28] Correct false runtime warning from camel_folder_info_build()
- Date: Thu, 14 Jun 2018 09:17:41 +0000 (UTC)
commit a7872713b53f5b58b8cb34e067764041fd1e7708
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 a9bcb9ffb..ba8767b14 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]