Removed zap_ptr hack from Bugzilla #602...it was incorrect.
authorRyan C. Gordon <icculus@icculus.org>
Mon, 15 Sep 2008 20:48:51 +0000
changeset 2762 90de10bc38ec
parent 2761 0c544c2eff77
child 2763 6fc50bdd88c0
Removed zap_ptr hack from Bugzilla #602...it was incorrect. (The actual bug was in SDL code removed from the 1.3 codebase.)
src/video/Xext/Xxf86vm/XF86VMode.c
--- a/src/video/Xext/Xxf86vm/XF86VMode.c	Mon Sep 15 08:41:03 2008 +0000
+++ b/src/video/Xext/Xxf86vm/XF86VMode.c	Mon Sep 15 20:48:51 2008 +0000
@@ -210,13 +210,6 @@
     return True;
 }
 
-/* this is to prevent an unaligned memory write on CPUs that need that. */
-static void
-zap_ptr(char *ptr, size_t size)
-{
-    memset(ptr, '\0', size);
-}
-
 Bool SDL_NAME(XF86VidModeGetModeLine) (dpy, screen, dotclock, modeline)
      Display *
          dpy;
@@ -292,7 +285,7 @@
         _XRead(dpy, (char *) modeline->private,
                modeline->privsize * sizeof(INT32));
     } else {
-        zap_ptr((char *) &modeline->private, sizeof(modeline->private));
+        modeline->private = NULL;
     }
     UnlockDisplay(dpy);
     SyncHandle();