[gnome-settings-daemon] wacom: Don't use uninitialized or stale values for has_oled
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] wacom: Don't use uninitialized or stale values for has_oled
- Date: Wed, 4 Sep 2013 18:18:27 +0000 (UTC)
commit 4b2ccce6d409837f0f3fe597ff8178e5a3555915
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue Sep 3 17:20:51 2013 -0400
wacom: Don't use uninitialized or stale values for has_oled
has_oled isn't scoped to the body of the loop, so we need to always
set it.
plugins/wacom/gsd-wacom-device.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/plugins/wacom/gsd-wacom-device.c b/plugins/wacom/gsd-wacom-device.c
index 32a3f4b..918363f 100644
--- a/plugins/wacom/gsd-wacom-device.c
+++ b/plugins/wacom/gsd-wacom-device.c
@@ -1271,8 +1271,7 @@ gsd_wacom_device_add_buttons_dir (WacomDevice *wacom_device,
name = g_strdup_printf (button_str, button_num++);
id = g_strdup_printf ("%s%c", button_str_id, i);
- if (libwacom_get_button_flag (wacom_device, i) & WACOM_BUTTON_OLED)
- has_oled = TRUE;
+ has_oled = (libwacom_get_button_flag (wacom_device, i) & WACOM_BUTTON_OLED) != 0;
l = g_list_append (l, gsd_wacom_tablet_button_new (name,
id,
settings_path,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]