On Fri, 2010-07-23 at 16:06 -0700, Denis Kenzior wrote: 
> Hi Inaky,
> 
> > +
> > +/*
> > + * Destroy/release the contents of a 'struct tx_queue_entry'
> > + *
> > + * This releases resources allocated *inside* @entry and @entry
> > + * itself.
> > + */
> > +static void tx_queue_entry_destroy_free(gpointer _entry, gpointer unused)
> 
> Can't this be simply tx_queue_entry_free?  And feel free to take struct

Sure, I'll rename that.

> tx_queue_entry * here.  Casting the destructor in g_foo_foreach is
> acceptable.

Heh, I'd rather have it like this: Repeat after me in a 1000-loop: casts
are evil and should be avoided for they muck the code by hiding warnings
when you change things and miss updating all the sites ... 

> > +{
> > +   struct tx_queue_entry *entry = _entry;
> > +
> > +   if (entry->destroy)
> > +           entry->destroy(entry->data);
> 
> An empty line after if/while/for blocks please.  I will update the
> coding-style document with this rule shortly.

Will do, thanks

_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono

Reply via email to