[PATCH v2 08/14] Log messages in TouchBeginDDXTouch() in a signal-safe manner

Chase Douglas chase.douglas at canonical.com
Mon Apr 9 11:17:34 PDT 2012


Signed-off-by: Chase Douglas <chase.douglas at canonical.com>
---
 dix/touch.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/dix/touch.c b/dix/touch.c
index 61e6d53..5a72a4a 100644
--- a/dix/touch.c
+++ b/dix/touch.c
@@ -161,7 +161,7 @@ TouchBeginDDXTouch(DeviceIntPtr dev, uint32_t ddx_id)
     TouchClassPtr t = dev->touch;
     DDXTouchPointInfoPtr ti = NULL;
     Bool emulate_pointer = (t->mode == XIDirectTouch);
-    char number[20];
+    char string[20];
 
     if (!t)
         return NULL;
@@ -199,12 +199,11 @@ TouchBeginDDXTouch(DeviceIntPtr dev, uint32_t ddx_id)
     /* If we get here, then we've run out of touches and we need to drop the
      * event (we're inside the SIGIO handler here) schedule a WorkProc to
      * grow the queue for us for next time. */
-    FormatUInt32(dev->last.num_touches, number);
-
     LogMessageVerbSigSafe(X_NONE, -1, dev->name);
     LogMessageVerbSigSafe(X_NONE, -1,
                           ": not enough space for touch events (max ");
-    LogMessageVerbSigSafe(X_NONE, -1, number);
+    FormatUInt64(dev->last.num_touches, string);
+    LogMessageVerbSigSafe(X_NONE, -1, string);
     LogMessageVerbSigSafe(X_NONE, -1, " touchpoints). Dropping this event.\n");
 
     if (!BitIsOn(resize_waiting, dev->id)) {
-- 
1.7.9.1



More information about the xorg-devel mailing list