@@ -13796,29 +13796,29 @@ PyObject *igraphmodule_Graph_community_voronoi(igraphmodule_GraphObject *self,
1379613796
1379713797 /* Handle weights parameter */
1379813798 if (igraphmodule_attrib_to_vector_t(weights_o, self, &weights_v, ATTRIBUTE_TYPE_EDGE)) {
13799- if (lengths_v != 0 ) {
13799+ if (lengths_v != NULL ) {
1380013800 igraph_vector_destroy(lengths_v); free(lengths_v);
1380113801 }
1380213802 return NULL;
1380313803 }
1380413804
1380513805 /* Initialize result vectors */
1380613806 if (igraph_vector_int_init(&membership_v, 0)) {
13807- if (lengths_v != 0 ) {
13807+ if (lengths_v != NULL ) {
1380813808 igraph_vector_destroy(lengths_v); free(lengths_v);
1380913809 }
13810- if (weights_v != 0 ) {
13810+ if (weights_v != NULL ) {
1381113811 igraph_vector_destroy(weights_v); free(weights_v);
1381213812 }
1381313813 igraphmodule_handle_igraph_error();
1381413814 return NULL;
1381513815 }
1381613816
1381713817 if (igraph_vector_int_init(&generators_v, 0)) {
13818- if (lengths_v != 0 ) {
13818+ if (lengths_v != NULL ) {
1381913819 igraph_vector_destroy(lengths_v); free(lengths_v);
1382013820 }
13821- if (weights_v != 0 ) {
13821+ if (weights_v != NULL ) {
1382213822 igraph_vector_destroy(weights_v); free(weights_v);
1382313823 }
1382413824 igraph_vector_int_destroy(&membership_v);
@@ -13833,10 +13833,10 @@ PyObject *igraphmodule_Graph_community_voronoi(igraphmodule_GraphObject *self,
1383313833 weights_v,
1383413834 mode, radius)) {
1383513835
13836- if (lengths_v != 0 ) {
13836+ if (lengths_v != NULL ) {
1383713837 igraph_vector_destroy(lengths_v); free(lengths_v);
1383813838 }
13839- if (weights_v != 0 ) {
13839+ if (weights_v != NULL ) {
1384013840 igraph_vector_destroy(weights_v); free(weights_v);
1384113841 }
1384213842 igraph_vector_int_destroy(&membership_v);
@@ -13847,10 +13847,10 @@ PyObject *igraphmodule_Graph_community_voronoi(igraphmodule_GraphObject *self,
1384713847
1384813848 /* Clean up input vectors */
1384913849
13850- if (lengths_v != 0 ) {
13850+ if (lengths_v != NULL ) {
1385113851 igraph_vector_destroy(lengths_v); free(lengths_v);
1385213852 }
13853- if (weights_v != 0 ) {
13853+ if (weights_v != NULL ) {
1385413854 igraph_vector_destroy(weights_v); free(weights_v);
1385513855 }
1385613856
0 commit comments