diff src/video/Xext/Xxf86vm/XF86VMode.c @ 4154:db4007f17bc8 SDL-1.2

Correct fix for Bugzilla #602.
author Ryan C. Gordon <icculus@icculus.org>
date Mon, 15 Sep 2008 20:47:55 +0000
parents e66db1af0714
children
line wrap: on
line diff
--- a/src/video/Xext/Xxf86vm/XF86VMode.c	Mon Sep 15 05:08:53 2008 +0000
+++ b/src/video/Xext/Xxf86vm/XF86VMode.c	Mon Sep 15 20:47:55 2008 +0000
@@ -214,12 +214,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;
@@ -290,7 +284,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();