]> granicus.if.org Git - apache/commitdiff
The previous commit pointed out an unfortunate problem with the
authorJeff Trawick <trawick@apache.org>
Tue, 3 Oct 2000 15:05:26 +0000 (15:05 +0000)
committerJeff Trawick <trawick@apache.org>
Tue, 3 Oct 2000 15:05:26 +0000 (15:05 +0000)
ap_os_case_canonical_filename() interface: It returns const char * on
platforms where no mapping is ever performed but char * on platforms
where mapping can occur.  Such a discrepancy seems to be a good choice,
as no platform is penalized with extra pathlength.

This tweak gets rid of a const misuse warning on systems where
ap_os_case_canonical_filename() returns const char *.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86376 13f79535-47bb-0310-9956-ffa450edef68

modules/cache/mod_file_cache.c

index 469d07f183ec4063b8f3f0356bd211c3791501eb..13a59bcd15312689c197cf35840dbd724e5f06f1 100644 (file)
@@ -137,7 +137,7 @@ typedef struct {
 #if APR_HAS_SENDFILE
     apr_file_t *file;
 #endif
-    char *filename;
+    const char *filename;
     apr_finfo_t finfo;
     int is_mmapped;
 #if APR_HAS_MMAP
@@ -273,7 +273,7 @@ static const char *mmapfile(cmd_parms *cmd, void *dummy, const char *filename)
     a_file *new_file;
     a_file tmp;
     apr_file_t *fd = NULL;
-    char *fspec;
+    const char *fspec;
 
     fspec = ap_os_case_canonical_filename(cmd->pool, filename);
     if (apr_stat(&tmp.finfo, fspec, cmd->temp_pool) != APR_SUCCESS) {