bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: new module: relpath


From: Eli Zaretskii
Subject: Re: new module: relpath
Date: Tue, 19 Jun 2012 18:51:37 +0300

> From: Akim Demaille <address@hidden>
> Date: Tue, 19 Jun 2012 14:15:19 +0200
> Cc: Eric Blake <address@hidden>,
>  address@hidden
> 
> > Maybe I'm looking at the wrong source file in gnulib. but I see these
> > at the beginning of canonicalize_filename_mode:
> > 
> >  if (name == NULL)
> >    {
> >      errno = EINVAL;
> >      return NULL;
> >    }
> > 
> >  if (name[0] == '\0')
> >    {
> >      errno = ENOENT;
> >      return NULL;
> >    }
> > 
> >  if (name[0] != '/')
> >    {
> >      rname = xgetcwd ();
> >      if (!rname)
> >        return NULL;
> 
> No, you are looking at the right file, but not the right place.

Sorry, you lost me here.  Why isn't this the right place?

I was trying to explain my comments about convert_abs_rel not testing
that the return values from canonicalize_filename_mode are non-NULL,
before using them.  The ab ove snippet is from
canonicalize_filename_mode, and AFAICT it clearly shows that the
return value _can_ be NULL.  So what am I missing?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]