Hi Marcel,

On Sat, Aug 28, 2010 at 08:45:37AM +0200, Marcel Holtmann wrote:
> Hi Daniel,
> 
> > Not handling the return code during initializing looks a bit
> > suspicious in my book. But that might be on purpose?
> 
> in some init functions we are a bit lazy with this. You will find some
> more if you look close enough.

I read that patches would be accepted then?

> >  src/profile.c |   19 +++++++++++++++----
> >  1 files changed, 15 insertions(+), 4 deletions(-)
> > 
> > diff --git a/src/profile.c b/src/profile.c
> > index a74d870..630350f 100644
> > --- a/src/profile.c
> > +++ b/src/profile.c
> > @@ -450,11 +450,12 @@ static int profile_init(void)
> >  {
> >     GDir *dir;
> >     const gchar *file;
> > +   int err = 0;
> >  
> >     DBG("");
> >  
> >     dir = g_dir_open(STORAGEDIR, 0, NULL);
> > -   if (dir != NULL) {
> > +   if (dir != NULL && err >= 0) {
> 
> This looks rather pointless. You just initialized err = 0.

Oh, stupid me. I was damn sure in my version there was a 'while(...)'
and not a 'if(...)' condition :). I agree, extremly pointless.

v1 is in the works.

thanks,
daniel
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to