From 77ca1c8ce0df4d7733bb5a382ca8c18adba93e1c Mon Sep 17 00:00:00 2001 From: Robert James Kaes Date: Sat, 31 May 2003 23:02:21 +0000 Subject: # Changed all the for calls to use the != test rather than < test. The change was recommended in the C/C++ User Journal magazine. --- src/reqs.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/reqs.c') diff --git a/src/reqs.c b/src/reqs.c index e4843d3..80ff703 100644 --- a/src/reqs.c +++ b/src/reqs.c @@ -1,4 +1,4 @@ -/* $Id: reqs.c,v 1.100 2003-05-30 16:22:30 rjkaes Exp $ +/* $Id: reqs.c,v 1.101 2003-05-31 23:02:20 rjkaes Exp $ * * This is where all the work in tinyproxy is actually done. Incoming * connections have a new child created for them. The child then @@ -127,7 +127,7 @@ check_allowed_connect_ports(int port) if (!ports_allowed_by_connect) return 1; - for (i = 0; i < vector_length(ports_allowed_by_connect); ++i) { + for (i = 0; i != vector_length(ports_allowed_by_connect); ++i) { data = vector_getentry(ports_allowed_by_connect, i, NULL); if (!data) return -1; @@ -905,7 +905,7 @@ remove_connection_headers(hashmap_t hashofheaders) ssize_t len; int i; - for (i = 0; i < (sizeof(headers) / sizeof(char *)); ++i) { + for (i = 0; i != (sizeof(headers) / sizeof(char *)); ++i) { /* Look for the connection header. If it's not found, return. */ len = hashmap_entry_by_key(hashofheaders, headers[i], (void **)&data); if (len <= 0) @@ -1056,7 +1056,7 @@ process_client_headers(struct conn_s *connptr, hashmap_t hashofheaders) /* * Delete the headers listed in the skipheaders list */ - for (i = 0; i < (sizeof(skipheaders) / sizeof(char *)); i++) { + for (i = 0; i != (sizeof(skipheaders) / sizeof(char *)); i++) { hashmap_remove(hashofheaders, skipheaders[i]); } @@ -1206,7 +1206,7 @@ process_server_headers(struct conn_s *connptr) /* * Delete the headers listed in the skipheaders list */ - for (i = 0; i < (sizeof(skipheaders) / sizeof(char *)); i++) { + for (i = 0; i != (sizeof(skipheaders) / sizeof(char *)); i++) { hashmap_remove(hashofheaders, skipheaders[i]); } -- cgit v1.2.3