]> granicus.if.org Git - apache/commitdiff
Remove some annoying warnings from http_protocol. This is untested, but
authorRyan Bloom <rbb@apache.org>
Tue, 17 Oct 2000 14:37:46 +0000 (14:37 +0000)
committerRyan Bloom <rbb@apache.org>
Tue, 17 Oct 2000 14:37:46 +0000 (14:37 +0000)
it makes sense logically.

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

modules/http/http_protocol.c

index ed185975e90986a4efbc35e526bd7741e89c4f5c..4124668c3c1cfd9092a51872a0588b0e43c6fe6e 100644 (file)
@@ -1911,6 +1911,7 @@ AP_DECLARE(int) ap_method_in_list(ap_method_list_t *l, const char *method)
     if ((l->method_list = NULL) || (l->method_list->nelts == 0)) {
        return 0;
     }
+    methods = (char **)l->method_list->elts;
     for (i = 0; i < l->method_list->nelts; ++i) {
        if (strcmp(method, methods[i]) == 0) {
            return 1;
@@ -1918,7 +1919,7 @@ AP_DECLARE(int) ap_method_in_list(ap_method_list_t *l, const char *method)
     }
     return 0;
 }
-    
+
 /*
  * Add the specified method to a method list (if it isn't already there).
  */
@@ -1942,6 +1943,7 @@ AP_DECLARE(void) ap_method_list_add(ap_method_list_t *l, const char *method)
      * Otherwise, see if the method name is in the array of string names.
      */
     if (l->method_list->nelts != 0) {
+        methods = (char **)l->method_list->elts;
        for (i = 0; i < l->method_list->nelts; ++i) {
            if (strcmp(method, methods[i]) == 0) {
                return;
@@ -1975,6 +1977,7 @@ AP_DECLARE(void) ap_method_list_remove(ap_method_list_t *l,
      */
     if (l->method_list->nelts != 0) {
        register int i, j, k;
+        methods = (char **)l->method_list->elts;
        for (i = 0; i < l->method_list->nelts; ) {
            if (strcmp(method, methods[i]) == 0) {
                for (j = i, k = i + 1; k < l->method_list->nelts; ++j, ++k) {