diff options
Diffstat (limited to 'xorg-server/hw/xfree86/modes/xf86Modes.c')
-rw-r--r-- | xorg-server/hw/xfree86/modes/xf86Modes.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/xorg-server/hw/xfree86/modes/xf86Modes.c b/xorg-server/hw/xfree86/modes/xf86Modes.c index c4a3eb0a3..43b223307 100644 --- a/xorg-server/hw/xfree86/modes/xf86Modes.c +++ b/xorg-server/hw/xfree86/modes/xf86Modes.c @@ -129,11 +129,13 @@ void xf86SetModeDefaultName(DisplayModePtr mode) { Bool interlaced = ! !(mode->Flags & V_INTERLACE); + char *tmp; - free(mode->name); + free((void *) mode->name); - XNFasprintf(&mode->name, "%dx%d%s", mode->HDisplay, mode->VDisplay, + XNFasprintf(&tmp, "%dx%d%s", mode->HDisplay, mode->VDisplay, interlaced ? "i" : ""); + mode->name = tmp; } /* |