ttld = SCMalloc(sizeof (DetectTtlData));
if (unlikely(ttld == NULL))
- goto error;
+ goto error;
ttld->ttl1 = 0;
ttld->ttl2 = 0;
default:
ttld->mode = DETECT_TTL_EQ;
- if ((arg2 != NULL && strlen(arg2) > 0) || (arg3 != NULL && strlen(arg3) > 0) || (arg1 == NULL ||strlen(arg1) == 0))
+ if ((arg2 != NULL && strlen(arg2) > 0) ||
+ (arg3 != NULL && strlen(arg3) > 0) ||
+ (arg1 == NULL ||strlen(arg1) == 0))
goto error;
ttld->ttl1 = (uint8_t) atoi(arg1);
} else {
ttld->mode = DETECT_TTL_EQ;
- if ((arg2 != NULL && strlen(arg2) > 0) ||
- (arg3 != NULL && strlen(arg3) > 0) ||
- (arg1 == NULL ||strlen(arg1) == 0))
+ if ((arg3 != NULL && strlen(arg3) > 0) ||
+ (arg1 == NULL ||strlen(arg1) == 0))
goto error;
ttld->ttl1 = (uint8_t) atoi(arg1);
return ttld;
error:
- if (ttld) SCFree(ttld);
- if (arg1) SCFree(arg1);
- if (arg2) SCFree(arg2);
- if (arg3) SCFree(arg3);
+ if (ttld)
+ SCFree(ttld);
+ if (arg1)
+ SCFree(arg1);
+ if (arg2)
+ SCFree(arg2);
+ if (arg3)
+ SCFree(arg3);
return NULL;
}