[PATCH 2/4] Handle the conversion failure when parsing item

Denis Kenzior denkenz at gmail.com
Tue Mar 16 13:27:54 PDT 2010


Hi Marcel,

> > +	if (utf8 == NULL)
> > +		return FALSE;
> > +
> > +	item->text = utf8;
> 
> Why bother with utf8 variable? Just do
> 
> 	if (item->text == NULL)
> 		return FALSE;
> 

I actually find this acceptable because 'item' is a return structure, so we 
should avoid modifying it in case of an error.

Regards,
-Denis


More information about the ofono mailing list