gnome-desktop r5405 - trunk/libgnome-desktop



Author: federico
Date: Wed Feb 18 00:36:14 2009
New Revision: 5405
URL: http://svn.gnome.org/viewvc/gnome-desktop?rev=5405&view=rev

Log:
Fix g_new0 / calloc confusion
2009-02-17  Federico Mena Quintero  <federico novell com>

	* edid-parse.c (decode_edid): Use g_new0() instead of calloc() so
	the caller can keep on using g_free(), and to actually abort on EOM.

Signed-off-by: Federico Mena Quintero <federico novell com>

Modified:
   trunk/libgnome-desktop/ChangeLog
   trunk/libgnome-desktop/edid-parse.c

Modified: trunk/libgnome-desktop/edid-parse.c
==============================================================================
--- trunk/libgnome-desktop/edid-parse.c	(original)
+++ trunk/libgnome-desktop/edid-parse.c	Wed Feb 18 00:36:14 2009
@@ -26,6 +26,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <math.h>
+#include <glib.h>
 
 #define TRUE 1
 #define FALSE 0
@@ -519,7 +520,7 @@
 MonitorInfo *
 decode_edid (const uchar *edid)
 {
-    MonitorInfo *info = calloc (1, sizeof (MonitorInfo));
+    MonitorInfo *info = g_new0 (MonitorInfo, 1);
 
     decode_check_sum (edid, info);
     



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]