evolution-data-server/evolution-data-server-3.44.3-glib-none-flag.patch

52 lines
2.2 KiB
Diff

diff --git a/src/calendar/libecal/e-cal-client.c b/src/calendar/libecal/e-cal-client.c
index 420e7186f..1ac37d4d4 100644
--- a/src/calendar/libecal/e-cal-client.c
+++ b/src/calendar/libecal/e-cal-client.c
@@ -5212,13 +5212,13 @@ e_cal_client_modify_objects_sync (ECalClient *client,
mod_flags = g_string_new (NULL);
flags_class = g_type_class_ref (E_TYPE_CAL_OBJ_MOD_TYPE);
- flags_value = g_flags_get_first_value (flags_class, mod);
- while (flags_value != NULL) {
+ for (flags_value = g_flags_get_first_value (flags_class, mod);
+ flags_value && mod;
+ flags_value = g_flags_get_first_value (flags_class, mod)) {
if (mod_flags->len > 0)
g_string_append_c (mod_flags, ':');
g_string_append (mod_flags, flags_value->value_nick);
mod &= ~flags_value->value;
- flags_value = g_flags_get_first_value (flags_class, mod);
}
strv = g_new0 (gchar *, g_slist_length (icalcomps) + 1);
@@ -5572,13 +5572,13 @@ e_cal_client_remove_objects_sync (ECalClient *client,
mod_flags = g_string_new (NULL);
flags_class = g_type_class_ref (E_TYPE_CAL_OBJ_MOD_TYPE);
- flags_value = g_flags_get_first_value (flags_class, mod);
- while (flags_value != NULL) {
+ for (flags_value = g_flags_get_first_value (flags_class, mod);
+ flags_value && mod;
+ flags_value = g_flags_get_first_value (flags_class, mod)) {
if (mod_flags->len > 0)
g_string_append_c (mod_flags, ':');
g_string_append (mod_flags, flags_value->value_nick);
mod &= ~flags_value->value;
- flags_value = g_flags_get_first_value (flags_class, mod);
}
g_variant_builder_init (&builder, G_VARIANT_TYPE ("a(ss)"));
diff --git a/src/libedataserver/e-source.c b/src/libedataserver/e-source.c
index 31d851e21..23b82f7b1 100644
--- a/src/libedataserver/e-source.c
+++ b/src/libedataserver/e-source.c
@@ -4622,7 +4622,7 @@ e_source_invoke_credentials_required_sync (ESource *source,
flags_class = g_type_class_ref (G_TYPE_TLS_CERTIFICATE_FLAGS);
for (flags_value = g_flags_get_first_value (flags_class, certificate_errors);
- flags_value;
+ flags_value && certificate_errors;
flags_value = g_flags_get_first_value (flags_class, certificate_errors)) {
if (certificate_errors_str->len)
g_string_append_c (certificate_errors_str, ':');