[gtk/matthiasc/for-master: 138/138] keymap: Remove leftover code
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/matthiasc/for-master: 138/138] keymap: Remove leftover code
- Date: Wed, 6 May 2020 17:18:29 +0000 (UTC)
commit baf82cdf7ab500818eb37848881966bb1e6a2ebc
Author: Matthias Clasen <mclasen redhat com>
Date: Wed May 6 13:15:45 2020 -0400
keymap: Remove leftover code
When I removed the 0-termination for the entries for
each keyval, I remove the code initializing the key,
but accidentally left the code that adds it to the
array, so gdk_keymap_get_cached_entries_for_keyval
returns one extra, uninitialized value at the end
of the array. Stop doing that.
gdk/gdkkeys.c | 4 ----
1 file changed, 4 deletions(-)
---
diff --git a/gdk/gdkkeys.c b/gdk/gdkkeys.c
index 4d8978e552..0c63aefa25 100644
--- a/gdk/gdkkeys.c
+++ b/gdk/gdkkeys.c
@@ -576,14 +576,10 @@ gdk_keymap_get_cached_entries_for_keyval (GdkKeymap *keymap,
cached = GPOINTER_TO_UINT (g_hash_table_lookup (keymap->cache, GUINT_TO_POINTER (keyval)));
if (cached == 0)
{
- GdkKeymapKey key;
-
offset = keymap->cached_keys->len;
GDK_KEYMAP_GET_CLASS (keymap)->get_entries_for_keyval (keymap, keyval, keymap->cached_keys);
- g_array_append_val (keymap->cached_keys, key);
-
len = keymap->cached_keys->len - offset;
g_assert (len <= 255);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]