summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMukund Sivaraman <muks@banu.com>2008-08-24 10:58:16 +0530
committerMukund Sivaraman <muks@banu.com>2008-08-24 10:58:16 +0530
commit62ddbd5e7491c4a751f0a4523b1d9d7acaeba9dd (patch)
tree6dc1d889a5a0318ad0632da3518a7ea342d8474f /src
parent90c1bb4b738dadc78867dcaec45993fc26a15233 (diff)
downloadtinyproxy-62ddbd5e7491c4a751f0a4523b1d9d7acaeba9dd.tar.gz
tinyproxy-62ddbd5e7491c4a751f0a4523b1d9d7acaeba9dd.zip
pos can never be less than 0 as it's of type size_t
Also fix the type which is passed in from various places.
Diffstat (limited to '')
-rw-r--r--src/acl.c2
-rw-r--r--src/log.c2
-rw-r--r--src/reqs.c2
-rw-r--r--src/vector.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/acl.c b/src/acl.c
index eb200b3..d61ccf3 100644
--- a/src/acl.c
+++ b/src/acl.c
@@ -309,7 +309,7 @@ check_acl(int fd, const char *ip, const char *host)
{
struct acl_s *acl;
int perm;
- int i;
+ size_t i;
assert(fd >= 0);
assert(ip != NULL);
diff --git a/src/log.c b/src/log.c
index 5cd3a4d..84ecb5c 100644
--- a/src/log.c
+++ b/src/log.c
@@ -203,7 +203,7 @@ send_stored_logs(void)
int level;
- int i;
+ size_t i;
for (i = 0; i != vector_length(log_message_storage); ++i) {
string = vector_getentry(log_message_storage, i, NULL);
diff --git a/src/reqs.c b/src/reqs.c
index 8d8cbe3..a757c6f 100644
--- a/src/reqs.c
+++ b/src/reqs.c
@@ -106,7 +106,7 @@ add_connect_port_allowed(int port)
static int
check_allowed_connect_ports(int port)
{
- ssize_t i;
+ size_t i;
int *data;
/*
diff --git a/src/vector.c b/src/vector.c
index d5ca69e..e9ca586 100644
--- a/src/vector.c
+++ b/src/vector.c
@@ -180,7 +180,7 @@ vector_getentry(vector_t vector, size_t pos, size_t * size)
struct vectorentry_s *ptr;
size_t loc;
- if (!vector || pos < 0 || pos >= vector->num_entries)
+ if (!vector || pos >= vector->num_entries)
return NULL;
loc = 0;