[gnome-builder] git: use autoptr and include default in switch
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] git: use autoptr and include default in switch
- Date: Sun, 29 May 2016 11:52:30 +0000 (UTC)
commit 04b85dbf70854abe4eae2154a9a6e2b452d6d03a
Author: Christian Hergert <chergert redhat com>
Date: Sun May 29 14:51:47 2016 +0300
git: use autoptr and include default in switch
plugins/git/ide-git-vcs-config.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/plugins/git/ide-git-vcs-config.c b/plugins/git/ide-git-vcs-config.c
index 4a112b5..41894a0 100644
--- a/plugins/git/ide-git-vcs-config.c
+++ b/plugins/git/ide-git-vcs-config.c
@@ -76,8 +76,8 @@ ide_git_vcs_config_get_config (IdeVcsConfig *self,
IdeVcsConfigType type,
GValue *value)
{
+ g_autoptr(GgitConfig) config = NULL;
GgitConfig *orig_config;
- GgitConfig *config;
g_return_if_fail (IDE_IS_GIT_VCS_CONFIG (self));
@@ -96,9 +96,10 @@ ide_git_vcs_config_get_config (IdeVcsConfig *self,
case IDE_VCS_CONFIG_EMAIL:
ide_git_vcs_config_get_string (config, "user.email", value, NULL);
break;
- }
- g_object_unref (config);
+ default:
+ break;
+ }
}
static void
@@ -121,6 +122,9 @@ ide_git_vcs_config_set_config (IdeVcsConfig *self,
case IDE_VCS_CONFIG_EMAIL:
ide_git_vcs_config_set_string (config, "user.email", value, NULL);
break;
+
+ default:
+ break;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]