apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lucian Adrian Grijincu" <lucian.griji...@gmail.com>
Subject ENOENT / ENODIR in apr_stat - wrong comment or code
Date Sun, 28 Oct 2007 12:27:01 GMT
in file_io/unix/filestat.c there this code block:


        /* WARNING: All errors but not found will be handled as not directory
         */
        if (errno != ENOENT)
            return APR_ENOENT;
        else
            return errno;

http://svn.apache.org/viewvc/apr/apr/trunk/file_io/unix/filestat.c?view=markup


Either the code is wrong or the comment (or, of course, my interpretation).

Should it be (and respect the comment):

        /* WARNING: All errors but not found will be handled as not directory
         */
        if (errno != ENOENT)
            return APR_ENODIR;
        else
            return errno;

or just this (it has the same functionality):

        return errno;
--
Lucian

Mime
View raw message