detect: fixup incorrect comments, indentation

pull/4717/head
Jeff Lucovsky 5 years ago
parent 31ed9786f6
commit d12950c9e4

@ -134,7 +134,6 @@ int DetectBytetestDoMatch(DetectEngineThreadCtx *det_ctx,
if (ptr == NULL || len <= 0) { if (ptr == NULL || len <= 0) {
SCReturnInt(0); SCReturnInt(0);
} }
//PrintRawDataFp(stdout,ptr,len);
} }
else { else {
SCLogDebug("absolute, data->offset %"PRIi32"", data->offset); SCLogDebug("absolute, data->offset %"PRIi32"", data->offset);
@ -159,7 +158,7 @@ int DetectBytetestDoMatch(DetectEngineThreadCtx *det_ctx,
extbytes = ByteExtractStringUint64(&val, data->base, extbytes = ByteExtractStringUint64(&val, data->base,
data->nbytes, (const char *)ptr); data->nbytes, (const char *)ptr);
if (extbytes <= 0) { if (extbytes <= 0) {
/* strtoull() return 0 if there is no numeric value in data string */ /* ByteExtractStringUint64() returns 0 if there is no numeric value in data string */
if (val == 0) { if (val == 0) {
SCLogDebug("No Numeric value"); SCLogDebug("No Numeric value");
SCReturnInt(0); SCReturnInt(0);
@ -226,15 +225,15 @@ int DetectBytetestDoMatch(DetectEngineThreadCtx *det_ctx,
} }
break; break;
case DETECT_BYTETEST_OP_GE: case DETECT_BYTETEST_OP_GE:
if (val >= value) { if (val >= value) {
match = 1; match = 1;
} }
break; break;
case DETECT_BYTETEST_OP_LE: case DETECT_BYTETEST_OP_LE:
if (val <= value) { if (val <= value) {
match = 1; match = 1;
} }
break; break;
default: default:
/* Should never get here as we handle this in parsing. */ /* Should never get here as we handle this in parsing. */
SCReturnInt(-1); SCReturnInt(-1);

Loading…
Cancel
Save