summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoy Zhang <[email protected]>2015-07-29 00:38:48 +0800
committermonsta <[email protected]>2015-09-01 12:10:00 +0300
commit67e99922f62204385825dead1246e61228a6a90e (patch)
tree4ea174be8eceabf7d58d9ca73fafdf8c49327fc6 /src
parent5ec722d8d4ab932f6587f0a5880c9ea7a55b412d (diff)
downloadmate-power-manager-67e99922f62204385825dead1246e61228a6a90e.tar.bz2
mate-power-manager-67e99922f62204385825dead1246e61228a6a90e.tar.xz
Save copying cost
Diffstat (limited to 'src')
-rw-r--r--src/gpm-prefs-core.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/gpm-prefs-core.c b/src/gpm-prefs-core.c
index 38185ae..37f6842 100644
--- a/src/gpm-prefs-core.c
+++ b/src/gpm-prefs-core.c
@@ -712,9 +712,8 @@ gpm_prefs_init (GpmPrefs *prefs)
&error
);
if (error == NULL && res != NULL) {
- g_variant_get(res,"(s)", &r);
+ g_variant_get(res,"(&s)", &r);
prefs->priv->can_shutdown = g_strcmp0(r,"yes")==0?TRUE:FALSE;
- g_free(r);
g_variant_unref (res);
} else if (error != NULL ) {
egg_error ("Error in dbus - %s", error->message);
@@ -729,9 +728,8 @@ gpm_prefs_init (GpmPrefs *prefs)
&error
);
if (error == NULL && res != NULL) {
- g_variant_get(res,"(s)", &r);
+ g_variant_get(res,"(&s)", &r);
prefs->priv->can_suspend = g_strcmp0(r,"yes")==0?TRUE:FALSE;
- g_free(r);
g_variant_unref (res);
} else if (error != NULL ) {
egg_error ("Error in dbus - %s", error->message);
@@ -746,9 +744,8 @@ gpm_prefs_init (GpmPrefs *prefs)
&error
);
if (error == NULL && res != NULL) {
- g_variant_get(res,"(s)", &r);
+ g_variant_get(res,"(&s)", &r);
prefs->priv->can_hibernate = g_strcmp0(r,"yes")==0?TRUE:FALSE;
- g_free(r);
g_variant_unref (res);
} else if (error != NULL ) {
egg_error ("Error in dbus - %s", error->message);