xf86-video-intel: src/i830_tv.c

Keith Packard keithp at kemper.freedesktop.org
Fri Aug 10 14:31:26 PDT 2007


 src/i830_tv.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

New commits:
diff-tree ed1b106fabf3a18489bdb3083326f27387a9cb72 (from f71b9358b4157a8cfdc694ddef8ca3f98926ca91)
Author: Keith Packard <keithp at koto.keithp.com>
Date:   Fri Aug 10 14:31:16 2007 -0700

    Clean up tv mode name allocation and copy.
    
    TV mode names used to contain the signalling standard along with the pixel
    size. The signalling has been moved to the TV_FORMAT property, but the
    allocation and initialization of the mode name was left a bit messy as a
    result.

diff --git a/src/i830_tv.c b/src/i830_tv.c
index aba0e3b..e3aeaf9 100644
--- a/src/i830_tv.c
+++ b/src/i830_tv.c
@@ -1415,10 +1415,8 @@ i830_tv_get_modes(xf86OutputPtr output)
 	    continue;
 
 	mode_ptr = xnfcalloc(1, sizeof(DisplayModeRec));
-    	mode_ptr->name = xnfalloc(strlen(tv_mode->name) + 
-				  strlen(input->name) + 4);
-	sprintf(mode_ptr->name, "%s", input->name);
-
+    	mode_ptr->name = xnfalloc(strlen(input->name) + 1);
+	strcpy (mode_ptr->name, input->name);
 
 	mode_ptr->HDisplay = hactive_s;
 	mode_ptr->HSyncStart = hactive_s + 1;


More information about the xorg-commit mailing list