mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-12 12:14:36 +03:00
Hashtable update
- use consistent type for key by introducing a new typedef - use unsigned types for sizes - name parameters in foreach function typedef
This commit is contained in:

committed by
BenBE

parent
15eab2012d
commit
7914ec201e
6
Vector.c
6
Vector.c
@ -60,14 +60,14 @@ static bool Vector_isConsistent(const Vector* this) {
|
||||
}
|
||||
}
|
||||
|
||||
int Vector_count(const Vector* this) {
|
||||
int items = 0;
|
||||
unsigned int Vector_count(const Vector* this) {
|
||||
unsigned int items = 0;
|
||||
for (int i = 0; i < this->items; i++) {
|
||||
if (this->array[i]) {
|
||||
items++;
|
||||
}
|
||||
}
|
||||
assert(items == this->items);
|
||||
assert(items == (unsigned int)this->items);
|
||||
return items;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user