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.
This commit is contained in:
parent
1e44781c4d
commit
a7f379fafc
@ -199,7 +199,7 @@ send_stored_logs(void)
|
|||||||
|
|
||||||
int level;
|
int level;
|
||||||
|
|
||||||
int i;
|
size_t i;
|
||||||
|
|
||||||
for (i = 0; i != vector_length(log_message_storage); ++i) {
|
for (i = 0; i != vector_length(log_message_storage); ++i) {
|
||||||
string = vector_getentry(log_message_storage, i, NULL);
|
string = vector_getentry(log_message_storage, i, NULL);
|
||||||
|
@ -117,7 +117,7 @@ add_connect_port_allowed(int port)
|
|||||||
static int
|
static int
|
||||||
check_allowed_connect_ports(int port)
|
check_allowed_connect_ports(int port)
|
||||||
{
|
{
|
||||||
ssize_t i;
|
size_t i;
|
||||||
int *data;
|
int *data;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -180,7 +180,7 @@ vector_getentry(vector_t vector, size_t pos, size_t* size)
|
|||||||
struct vectorentry_s *ptr;
|
struct vectorentry_s *ptr;
|
||||||
size_t loc;
|
size_t loc;
|
||||||
|
|
||||||
if (!vector || pos < 0 || pos >= vector->num_entries)
|
if (!vector || pos >= vector->num_entries)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
loc = 0;
|
loc = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user