httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Cholet <cho...@logilune.com>
Subject RE: server config directory patch
Date Fri, 05 Jan 2001 14:46:08 GMT
>> --- http_config.c.old   Thu Jan  4 11:38:14 2001
>> +++ http_config.c       Thu Jan  4 11:49:43 2001
>> @@ -1252,9 +1252,8 @@
>>         }
>>         candidates = ap_make_array(p, 1, sizeof(fnames));
>>         while ((dir_entry = readdir(dirp)) != NULL) {
>> +           /* strip out '.' and '..' as well as hidden '.files' */
>> +           if (strncmp(dir_entry->d_name, ".", 1)) {
>
> Isn't a strncmp a bit overkill to check the first character of the
> filename? if (dir_entry->d_name[0] == ".") {

shouldn't that be
   if (dir_entry->d_name[0] == '.') {

--
Eric


Mime
View raw message