Reworked initialization

This commit is contained in:
Luca Deri
2023-09-10 09:36:54 +02:00
parent 63977459b6
commit 805df2e5ce
+6 -2
View File
@@ -33,8 +33,12 @@
#endif
ndpi_domain_classify* ndpi_domain_classify_alloc() {
ndpi_domain_classify *cat = (ndpi_domain_classify*)ndpi_calloc(1, sizeof(ndpi_domain_classify));
int i;
ndpi_domain_classify *cat = (ndpi_domain_classify*)ndpi_malloc(sizeof(ndpi_domain_classify));
for(i=0; i<MAX_NUM_NDPI_DOMAIN_CLASSIFICATIONS; i++)
cat->classes[i].class_id = 0, cat->classes[i].domains = NULL;
return((ndpi_domain_classify*)cat);
}