app-layer/proto-detect: minor cleanup

Make sure the mask calculation is u32.
pull/4784/head
Victor Julien 5 years ago
parent aba4e19548
commit ed8f48b053

@ -645,12 +645,10 @@ static uint32_t AppLayerProtoDetectProbingParserGetMask(AppProto alproto)
SCEnter();
if (!(alproto > ALPROTO_UNKNOWN && alproto < ALPROTO_FAILED)) {
SCLogError(SC_ERR_ALPARSER, "Unknown protocol detected - %"PRIu16,
alproto);
exit(EXIT_FAILURE);
FatalError(SC_ERR_ALPARSER, "Unknown protocol detected - %u", alproto);
}
SCReturnUInt(1 << alproto);
SCReturnUInt(1UL << (uint32_t)alproto);
}
static AppLayerProtoDetectProbingParserElement *AppLayerProtoDetectProbingParserElementAlloc(void)

Loading…
Cancel
Save