From b63bc73b93255d27e784e5e1dbf99fa4e1dae76b Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Wed, 26 Aug 2009 15:14:48 +0000 Subject: XML: remove all useless instance_init functions * Use Coccinelle semantic patch tool (http://coccinelle.lip6.fr/) to remove useless instance_init functions, the first patch applied was: @@ type T,V; identifier I, J; parameter list P; expression E1; @@ V instance_init(T node) { <... ( - E1 = 0; | - E1 = NULL; | - E1 = FALSE; ) ...> } It removes useless initialization to 0 (GObject already zeroes allocated objects). The second one is: @ rule1 @ type T; identifier node,fn; @@ - static void fn(T *node) { } @ rule2 extends rule1 @ typedef GType, GInstanceInitFunc; identifier type_constructor; @@ GType type_constructor() { <... - (GInstanceInitFunc)fn + NULL ...> } It removes empty instance_init functions. --- lasso/xml/ws/wsa_endpoint_reference.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'lasso/xml/ws/wsa_endpoint_reference.c') diff --git a/lasso/xml/ws/wsa_endpoint_reference.c b/lasso/xml/ws/wsa_endpoint_reference.c index 0605897a..c09e67ac 100644 --- a/lasso/xml/ws/wsa_endpoint_reference.c +++ b/lasso/xml/ws/wsa_endpoint_reference.c @@ -71,10 +71,6 @@ static LassoNodeClass *parent_class = NULL; static void instance_init(LassoWsAddrEndpointReference *node) { - node->Address = NULL; - node->ReferenceParameters = NULL; - node->Metadata = NULL; - node->any = NULL; node->attributes = g_hash_table_new_full( g_str_hash, g_str_equal, g_free, g_free); } -- cgit