Skip to content

Commit

Permalink
detect: fixup incorrect comments, indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jlucovsky committed Mar 22, 2020
1 parent 31ed978 commit d12950c
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions src/detect-bytetest.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ int DetectBytetestDoMatch(DetectEngineThreadCtx *det_ctx,
if (ptr == NULL || len <= 0) {
SCReturnInt(0);
}
//PrintRawDataFp(stdout,ptr,len);
}
else {
SCLogDebug("absolute, data->offset %"PRIi32"", data->offset);
Expand All @@ -159,7 +158,7 @@ int DetectBytetestDoMatch(DetectEngineThreadCtx *det_ctx,
extbytes = ByteExtractStringUint64(&val, data->base,
data->nbytes, (const char *)ptr);
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) {
SCLogDebug("No Numeric value");
SCReturnInt(0);
Expand Down Expand Up @@ -226,15 +225,15 @@ int DetectBytetestDoMatch(DetectEngineThreadCtx *det_ctx,
}
break;
case DETECT_BYTETEST_OP_GE:
if (val >= value) {
match = 1;
}
break;
if (val >= value) {
match = 1;
}
break;
case DETECT_BYTETEST_OP_LE:
if (val <= value) {
match = 1;
}
break;
if (val <= value) {
match = 1;
}
break;
default:
/* Should never get here as we handle this in parsing. */
SCReturnInt(-1);
Expand Down

0 comments on commit d12950c

Please sign in to comment.