[evolution-data-server] Correct some possibly uninitialized variables usages
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Correct some possibly uninitialized variables usages
- Date: Thu, 4 Feb 2016 09:27:21 +0000 (UTC)
commit 58e028001a2d18eea3986f51ef2a00e687d9b419
Author: Milan Crha <mcrha redhat com>
Date: Thu Feb 4 10:26:51 2016 +0100
Correct some possibly uninitialized variables usages
libedataserver/e-source-camel.c | 5 ++++-
.../e-credentials-prompter-impl-google.c | 8 ++++++--
2 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/libedataserver/e-source-camel.c b/libedataserver/e-source-camel.c
index 000e6b7..a554e15 100644
--- a/libedataserver/e-source-camel.c
+++ b/libedataserver/e-source-camel.c
@@ -135,7 +135,7 @@ G_DEFINE_ABSTRACT_TYPE (
static GParamSpec *
param_spec_clone (GParamSpec *pspec)
{
- GParamSpec *clone;
+ GParamSpec *clone = NULL;
GParamFlags flags;
const gchar *name, *nick, *blurb;
@@ -378,6 +378,9 @@ subclass_class_init (gpointer g_class,
continue;
pspec = param_spec_clone (properties[ii]);
+ if (!pspec)
+ continue;
+
pspec->flags |= E_SOURCE_PARAM_SETTING;
/* Clear the G_PARAM_CONSTRUCT flag. We apply default
diff --git a/libedataserverui/e-credentials-prompter-impl-google.c
b/libedataserverui/e-credentials-prompter-impl-google.c
index 4fadef5..f78e0c5 100644
--- a/libedataserverui/e-credentials-prompter-impl-google.c
+++ b/libedataserverui/e-credentials-prompter-impl-google.c
@@ -384,14 +384,18 @@ cpi_google_get_access_token_thread (gpointer user_data)
cancellable = td->cancellable;
- if (g_cancellable_is_cancelled (cancellable))
+ if (g_cancellable_is_cancelled (cancellable)) {
+ soup_status = SOUP_STATUS_CANCELLED;
goto exit;
+ }
post_data = cpi_google_create_token_post_data (td->authorization_code);
g_warn_if_fail (post_data != NULL);
- if (!post_data)
+ if (!post_data) {
+ soup_status = SOUP_STATUS_NO_CONTENT;
goto exit;
+ }
soup_status = cpi_google_post_data_sync (GOOGLE_TOKEN_URI, post_data,
td->registry, td->cred_source, cancellable, &response_json);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]