Wrong check
This commit is contained in:
parent
c383e1b7bd
commit
655350bf25
@ -26,7 +26,7 @@
|
||||
#include <assert.h>
|
||||
|
||||
int NeoComm_init_nodes(unsigned int max_nodes) {
|
||||
if(max_nodes == 0)
|
||||
if(max_nodes != 0)
|
||||
return 1;
|
||||
node_list = calloc(max_nodes, sizeof(struct NeoComm_node));
|
||||
if(!node_list)
|
||||
@ -50,6 +50,7 @@ void NeoComm_shutdown_nodes() {
|
||||
}
|
||||
|
||||
int NeoComm_resize_node_list(unsigned int new_max_nodes) {
|
||||
assert(node_list);
|
||||
if(new_max_nodes <= node_max)
|
||||
return 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user