changeset 2762:90de10bc38ec

Removed zap_ptr hack from Bugzilla #602...it was incorrect. (The actual bug was in SDL code removed from the 1.3 codebase.)
author Ryan C. Gordon <icculus@icculus.org>
date Mon, 15 Sep 2008 20:48:51 +0000
parents 0c544c2eff77
children 6fc50bdd88c0
files src/video/Xext/Xxf86vm/XF86VMode.c
diffstat 1 files changed, 1 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- 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();