xf86-video-intel: Branch 'modesetting-rotation' - src/i830_xf86Modes.c
Keith Packard
keithp at kemper.freedesktop.org
Sat Jan 27 22:29:20 EET 2007
src/i830_xf86Modes.c | 4 +---
1 files changed, 1 insertion(+), 3 deletions(-)
New commits:
diff-tree 00decd3b6cea0de22c88b9504dbe26d680e8ab16 (from 7a5f17087bda2833e84fa7e7ff0cb168943b89b6)
Author: Krzysztof Halasa <khc at pm.waw.pl>
Date: Sat Jan 27 12:29:31 2007 -0800
Don't zero out mode structure after setting name field.
Instead of using memset to zero the structure (at the wrong time, no less),
use xcalloc to gather pre-initialized memory.
diff --git a/src/i830_xf86Modes.c b/src/i830_xf86Modes.c
index f37eaeb..b5f06d6 100644
--- a/src/i830_xf86Modes.c
+++ b/src/i830_xf86Modes.c
@@ -564,7 +564,7 @@ xf86GetConfigModes (XF86ConfModeLinePtr
for (; conf_mode; conf_mode = (XF86ConfModeLinePtr) conf_mode->list.next)
{
- mode = xalloc(sizeof(DisplayModeRec));
+ mode = xcalloc(1, sizeof(DisplayModeRec));
if (!mode)
continue;
mode->name = xstrdup(conf_mode->ml_identifier);
@@ -573,8 +573,6 @@ xf86GetConfigModes (XF86ConfModeLinePtr
xfree (mode);
continue;
}
-
- memset(mode,'\0',sizeof(DisplayModeRec));
mode->type = 0;
mode->Clock = conf_mode->ml_clock;
mode->HDisplay = conf_mode->ml_hdisplay;
More information about the xorg-commit
mailing list