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