chiark / gitweb /
Make list_length and string_item_to_ipaddr const-correct.
[secnet.git] / conffile.c
index ede9c49d55eb5c92221525e41d1b9fc936f05477..24d7e25b154e1ec30eaf8b48ce14b9179007b713 100644 (file)
@@ -561,10 +561,10 @@ list_t *list_new(void)
     return NULL;
 }
 
-int32_t list_length(list_t *a)
+int32_t list_length(const list_t *a)
 {
     int32_t l=0;
-    list_t *i;
+    const list_t *i;
     for (i=a; i; i=i->next) { assert(l < INT_MAX); l++; }
     return l;
 }