summaryrefslogtreecommitdiff
path: root/src/gpm-prefs-core.c
diff options
context:
space:
mode:
authorRoy Zhang <[email protected]>2015-07-29 00:38:48 +0800
committerinfirit <[email protected]>2015-08-31 21:41:17 +0200
commit3ad011fdd50aa55684c86675b65327a8378caef4 (patch)
treee15e773a6d2a86cf237d990fb85bdc0ce6adfdfe /src/gpm-prefs-core.c
parentb8a3bbbe2c22bfe2d91a305f1facc829889a4022 (diff)
downloadmate-power-manager-3ad011fdd50aa55684c86675b65327a8378caef4.tar.bz2
mate-power-manager-3ad011fdd50aa55684c86675b65327a8378caef4.tar.xz
Save copying cost
Diffstat (limited to 'src/gpm-prefs-core.c')
-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);