make sure we set rc before referencing it

use a somewhat better warning message for a failure of
ap_server_relative_root()


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93962 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jeff Trawick
2002-03-15 20:43:03 +00:00
parent abaf919813
commit d7c6f23395

View File

@ -196,7 +196,12 @@ static void cache_the_file(cmd_parms *cmd, const char *filename, int mmap)
const char *fspec;
fspec = ap_server_root_relative(cmd->pool, filename);
if (!fspec || (rc = apr_stat(&tmp.finfo, fspec, APR_FINFO_MIN,
if (!fspec) {
ap_log_error(APLOG_MARK, APLOG_WARNING|APLOG_NOERRNO, 0, cmd->server,
"mod_file_cache: unable to find relative path for "
"%s, skipping", filename);
}
if ((rc = apr_stat(&tmp.finfo, fspec, APR_FINFO_MIN,
cmd->temp_pool)) != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_WARNING, rc, cmd->server,
"mod_file_cache: unable to stat(%s), skipping", filename);