app-layer/proto-detect: minor cleanup

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

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

Loading…
Cancel
Save