Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Removed zap_ptr hack from Bugzilla #602...it was incorrect.
Browse files Browse the repository at this point in the history
(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 ae92ffa
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/video/Xext/Xxf86vm/XF86VMode.c
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit ae92ffa

Please sign in to comment.