]> granicus.if.org Git - apache/commitdiff
subreq_ok *is* a macro.
authorAndré Malo <nd@apache.org>
Sun, 3 Aug 2003 19:14:55 +0000 (19:14 +0000)
committerAndré Malo <nd@apache.org>
Sun, 3 Aug 2003 19:14:55 +0000 (19:14 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100893 13f79535-47bb-0310-9956-ffa450edef68

modules/mappers/mod_rewrite.c

index f40492d9b2da4c7986cbd953dc068d67c9857b7d..d3692db95a137dfdbce411316741e851784bd89d 100644 (file)
 #define LEFT_CURLY  '{'
 #define RIGHT_CURLY '}'
 
+/*
+ * check that a subrequest won't cause infinite recursion
+ *
+ * either not in a subrequest, or in a subrequest
+ * and URIs aren't NULL and sub/main URIs differ
+ */
+#define subreq_ok(r) (!r->main || \
+    (r->main->uri && r->uri && strcmp(r->main->uri, r->uri)))
+
 
 /*
  * +-------------------------------------------------------+
@@ -1520,17 +1529,6 @@ static const char *lookup_header(request_rec *r, const char *name)
     return val;
 }
 
-/* check that a subrequest won't cause infinite recursion */
-static int subreq_ok(request_rec *r)
-{
-    /*
-     * either not in a subrequest, or in a subrequest
-     * and URIs aren't NULL and sub/main URIs differ
-     */
-    return (!r->main ||
-            (r->main->uri && r->uri && strcmp(r->main->uri, r->uri)));
-}
-
 /*
  * generic variable lookup
  */