From 08c066cac2efdfcf569e47609e9e1b0a947ce129 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Fri, 23 May 2008 20:07:00 +0200 Subject: Mark initialisation functions with malloc attribute. All the initialisation functions returning a new object instance that was allocated through malloc() or calloc() can get the malloc attribute so that the compiler can optimise their call. --- src/xine-utils/xmlparser.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/xine-utils/xmlparser.c') diff --git a/src/xine-utils/xmlparser.c b/src/xine-utils/xmlparser.c index 2922135e2..a4917429b 100644 --- a/src/xine-utils/xmlparser.c +++ b/src/xine-utils/xmlparser.c @@ -36,6 +36,7 @@ #include "xineutils.h" #else #define lprintf(...) +#define XINE_MALLOC #endif #include "xmllexer.h" #include "xmlparser.h" @@ -78,7 +79,7 @@ static void free_xml_node(xml_node_t * node) { free(node); } -static xml_property_t * new_xml_property(void) { +static xml_property_t *XINE_MALLOC new_xml_property(void) { xml_property_t * new_property; new_property = (xml_property_t*) malloc(sizeof(xml_property_t)); -- cgit v1.2.3