[PATCH 2/4] Handle the conversion failure when parsing item
Marcel Holtmann
marcel at holtmann.org
Tue Mar 16 21:40:43 PDT 2010
Hi Denis,
> > > + 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.
in general it makes no difference since the assigned pointer will be the
same as the previous one. However this is a minor nitpick and nothing
major. So I am fine either way.
Regards
Marcel
More information about the ofono
mailing list