From 880ad1e19afd83ac115948b67d4049e16cb12df0 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 23 Jun 2009 14:48:17 +1000 Subject: Initialize the axis labels to 0, not "misc". If we don't know what an axis label is, then don't initialize it. None is a valid label. Signed-off-by: Peter Hutterer --- src/evdev.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/evdev.c') diff --git a/src/evdev.c b/src/evdev.c index 1d2ca36..922d5f3 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -2054,10 +2054,7 @@ static void EvdevInitAxesLabels(EvdevPtr pEvdev, int natoms, Atom *atoms) misc_label = AXIS_LABEL_PROP_ABS_MISC; } - /* First, make sure all atoms are initialized */ - atom = XIGetKnownProperty(misc_label); - for (axis = 0; axis < pEvdev->num_vals; axis++) - atoms[axis] = atom; + memset(atoms, 0, natoms * sizeof(Atom)); /* Now fill the ones we know */ for (axis = 0; axis < labels_len; axis++) -- cgit v1.2.3