aboutsummaryrefslogtreecommitdiff
path: root/tests/unit
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2024-08-24 16:55:20 +0200
committerLuca Deri <deri@ntop.org>2024-08-24 16:55:20 +0200
commit0a4198b35a2c8085942ba1055b1766000f2825c4 (patch)
treec1b1649cd84b0748c689ae5b3bf2f2d9f0db85cc /tests/unit
parentb627ec91d10e9a811a1b402dec32a6ce5963e4d2 (diff)
Fix for old gcc compilers
Diffstat (limited to 'tests/unit')
-rw-r--r--tests/unit/unit.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/unit/unit.c b/tests/unit/unit.c
index 8e797a3b1..75157a0a7 100644
--- a/tests/unit/unit.c
+++ b/tests/unit/unit.c
@@ -282,11 +282,14 @@ int serializeProtoUnitTest(void)
}
assert(ndpi_init_serializer(&serializer, fmt) != -1);
- ndpi_protocol ndpi_proto = { .proto.master_protocol = NDPI_PROTOCOL_TLS,
- .proto.app_protocol = NDPI_PROTOCOL_FACEBOOK,
- .protocol_by_ip = NDPI_PROTOCOL_FACEBOOK,
- .category = NDPI_PROTOCOL_CATEGORY_SOCIAL_NETWORK };
+ ndpi_protocol ndpi_proto;
ndpi_risk risks = 0;
+
+ ndpi_proto.proto.master_protocol = NDPI_PROTOCOL_TLS,
+ ndpi_proto.proto.app_protocol = NDPI_PROTOCOL_FACEBOOK,
+ ndpi_proto.protocol_by_ip = NDPI_PROTOCOL_FACEBOOK,
+ ndpi_proto.category = NDPI_PROTOCOL_CATEGORY_SOCIAL_NETWORK;
+
NDPI_SET_BIT(risks, NDPI_MALFORMED_PACKET);
NDPI_SET_BIT(risks, NDPI_TLS_WEAK_CIPHER);
NDPI_SET_BIT(risks, NDPI_TLS_OBSOLETE_VERSION);