Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Removed zap_ptr hack from Bugzilla #602...it was incorrect.

(The actual bug was in SDL code removed from the 1.3 codebase.)
  • Loading branch information
icculus committed Sep 15, 2008
1 parent ed075b8 commit ae92ffad1c2900aef67a6ac55dd1d95a91a81808
Showing with 1 addition and 8 deletions.
  1. +1 −8 src/video/Xext/Xxf86vm/XF86VMode.c
@@ -210,13 +210,6 @@ SDL_NAME(XF86VidModeGetGamma) (Display * dpy, int screen,
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 @@ SDL_NAME(XF86VidModeModeLine) * modeline;
_XRead(dpy, (char *) modeline->private,
modeline->privsize * sizeof(INT32));
} else {
zap_ptr((char *) &modeline->private, sizeof(modeline->private));
modeline->private = NULL;
}
UnlockDisplay(dpy);
SyncHandle();

0 comments on commit ae92ffa

Please sign in to comment.