]> granicus.if.org Git - apache/commitdiff
Save a useless check:
authorStefan Fritsch <sf@apache.org>
Tue, 11 Jan 2011 23:10:06 +0000 (23:10 +0000)
committerStefan Fritsch <sf@apache.org>
Tue, 11 Jan 2011 23:10:06 +0000 (23:10 +0000)
ap_get_request_note() cannot fail unless there is a bug somewhere and if
prep_walk_cache() returned NULL, we would just segfault later on.

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

server/request.c

index 83cc8517a03178d5c1d78f3744a34a4796f08c9b..9eaee15e4a249654371addca11c6cf1492449ca2 100644 (file)
@@ -333,9 +333,7 @@ static walk_cache_t *prep_walk_cache(apr_size_t t, request_rec *r)
      * that exists; if not, then create a new walk cache.
      */
     note = ap_get_request_note(r, t);
-    if (!note) {
-        return NULL;
-    }
+    AP_DEBUG_ASSERT(note != NULL);
 
     copy_cache = prev_cache = *note;
     count = prev_cache ? (prev_cache->count + 1) : 0;