diff --git a/src/detect-priority.c b/src/detect-priority.c index c5b18c5152..afd4a3489c 100644 --- a/src/detect-priority.c +++ b/src/detect-priority.c @@ -102,9 +102,8 @@ static int DetectPrioritySetup (DetectEngineCtx *de_ctx, Signature *s, char *raw "to priority keyword"); goto error; } - s->prio = prio; /* if we have reached here, we have had a valid priority. Assign it */ - //s->prio = atoi(prio_str); + s->prio = prio; return 0; error: diff --git a/src/detect-rev.c b/src/detect-rev.c index 866d5bc171..6fbb66da5a 100644 --- a/src/detect-rev.c +++ b/src/detect-rev.c @@ -53,16 +53,15 @@ static int DetectRevSetup (DetectEngineCtx *de_ctx, Signature *s, char *rawstr) dubbed = 1; } - long rev = 0; + unsigned long rev = 0; char *endptr = NULL; - rev = strtol(rawstr, &endptr, 10); + rev = strtoul(rawstr, &endptr, 10); if (endptr == NULL || *endptr != '\0') { SCLogError(SC_ERR_INVALID_SIGNATURE, "Saw an invalid character as arg " "to rev keyword"); goto error; } s->rev = rev; - //s->rev = (uint8_t)atoi(str); if (dubbed) SCFree(str); diff --git a/src/detect.h b/src/detect.h index d35a4e12dc..f929fe8bf0 100644 --- a/src/detect.h +++ b/src/detect.h @@ -433,7 +433,7 @@ typedef struct Signature_ { uint32_t id; /**< sid, set by the 'sid' rule keyword */ uint32_t gid; /**< generator id */ - uint8_t rev; + uint32_t rev; /** classification id **/ uint8_t class;