mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-12 12:14:36 +03:00
Clean up some needless malloc casts, convert some mallocs to callocs, and fix some style
This commit is contained in:
2
Vector.c
2
Vector.c
@ -37,7 +37,7 @@ Vector* Vector_new(ObjectClass* type, bool owner, int size) {
|
||||
|
||||
if (size == DEFAULT_SIZE)
|
||||
size = 10;
|
||||
this = (Vector*) malloc(sizeof(Vector));
|
||||
this = malloc(sizeof(Vector));
|
||||
this->growthRate = size;
|
||||
this->array = (Object**) calloc(size, sizeof(Object*));
|
||||
this->arraySize = size;
|
||||
|
Reference in New Issue
Block a user