diff options
author | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2009-08-26 15:14:48 +0000 |
---|---|---|
committer | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2009-08-26 15:14:48 +0000 |
commit | b63bc73b93255d27e784e5e1dbf99fa4e1dae76b (patch) | |
tree | 7a9feeddf10c069bf243796896d2898bee632c49 /lasso/xml/saml-2.0/saml2_name_id.c | |
parent | 291e0c05fa91b9d8e937895da6b0f1da658cd3fc (diff) | |
download | lasso-b63bc73b93255d27e784e5e1dbf99fa4e1dae76b.tar.gz lasso-b63bc73b93255d27e784e5e1dbf99fa4e1dae76b.tar.xz lasso-b63bc73b93255d27e784e5e1dbf99fa4e1dae76b.zip |
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.
Diffstat (limited to 'lasso/xml/saml-2.0/saml2_name_id.c')
-rw-r--r-- | lasso/xml/saml-2.0/saml2_name_id.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/lasso/xml/saml-2.0/saml2_name_id.c b/lasso/xml/saml-2.0/saml2_name_id.c index 61b47df8..ed42b5f7 100644 --- a/lasso/xml/saml-2.0/saml2_name_id.c +++ b/lasso/xml/saml-2.0/saml2_name_id.c @@ -71,15 +71,6 @@ static LassoNodeClass *parent_class = NULL; /* instance and class init functions */ /*****************************************************************************/ -static void -instance_init(LassoSaml2NameID *node) -{ - node->content = NULL; - node->Format = NULL; - node->SPProvidedID = NULL; - node->NameQualifier = NULL; - node->SPNameQualifier = NULL; -} static void class_init(LassoSaml2NameIDClass *klass) @@ -108,7 +99,7 @@ lasso_saml2_name_id_get_type() NULL, sizeof(LassoSaml2NameID), 0, - (GInstanceInitFunc) instance_init, + NULL, NULL }; |