[gnome-color-manager] trivial: don't clobber the return value when we fail to restore the lcd brightness
- From: Richard Hughes <rhughes src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-color-manager] trivial: don't clobber the return value when we fail to restore the lcd brightness
- Date: Thu, 24 Dec 2009 09:44:22 +0000 (UTC)
commit cb0b33e60a03cff9641167b42b8c8f1c99ae8d8a
Author: Richard Hughes <richard hughsie com>
Date: Thu Dec 24 09:43:50 2009 +0000
trivial: don't clobber the return value when we fail to restore the lcd brightness
src/gcm-calibrate.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/gcm-calibrate.c b/src/gcm-calibrate.c
index ec2145b..b32a9a7 100644
--- a/src/gcm-calibrate.c
+++ b/src/gcm-calibrate.c
@@ -87,6 +87,7 @@ gcm_calibrate_display (GcmCalibrate *calibrate, GtkWindow *window, GError **erro
{
GcmCalibrateClass *klass = GCM_CALIBRATE_GET_CLASS (calibrate);
gboolean ret = TRUE;
+ gboolean ret_tmp;
GtkWidget *dialog;
GtkResponseType response;
GString *string = NULL;
@@ -218,8 +219,8 @@ out:
/* restore brightness */
if (percentage != G_MAXUINT) {
/* set the new brightness */
- ret = gcm_brightness_set_percentage (brightness, percentage, &error_tmp);
- if (!ret) {
+ ret_tmp = gcm_brightness_set_percentage (brightness, percentage, &error_tmp);
+ if (!ret_tmp) {
egg_warning ("failed to restore brightness: %s", error_tmp->message);
g_error_free (error_tmp);
/* not fatal */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]