httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dgau...@hyperreal.org
Subject cvs commit: apache-1.3/src/modules/standard mod_autoindex.c
Date Fri, 12 Jun 1998 17:42:44 GMT
dgaudet     98/06/12 10:42:43

  Modified:    src/modules/standard mod_autoindex.c
  Log:
  - It's not possible for name to be NULL.
  - It's not necessary to test name[0] == 0 because the next if will fail in
    that event anyhow.  Ditto for name[1] == 0.
  
  Revision  Changes    Path
  1.80      +1 -13     apache-1.3/src/modules/standard/mod_autoindex.c
  
  Index: mod_autoindex.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_autoindex.c,v
  retrieving revision 1.79
  retrieving revision 1.80
  diff -u -r1.79 -r1.80
  --- mod_autoindex.c	1998/06/12 15:53:23	1.79
  +++ mod_autoindex.c	1998/06/12 17:42:42	1.80
  @@ -140,20 +140,8 @@
    * matches ".." or "../").  Hopefully this one call is significantly less
    * expensive than multiple strcmp() calls.
    */
  -static int is_parent(const char *name)
  +static ap_inline int is_parent(const char *name)
   {
  -    /*
  -     * If it's no name at all, it isn't our parent.
  -     */
  -    if (name == NULL) {
  -        return 0;
  -    }
  -    /*
  -     * Nor is it if the name isn't long enough.
  -     */
  -    if ((name[0] == '\0') || (name[1] == '\0')) {
  -        return 0;
  -    }
       /*
        * Now, IFF the first two bytes are dots, and the third byte is either
        * EOS (\0) or a slash followed by EOS, we have a match.
  
  
  

Mime
View raw message