# HG changeset patch # User Matti Hamalainen # Date 1560756425 -10800 # Node ID f350c7514785c3fa55c45b629c58859672d209db # Parent f2ff364065ebe7abbe94002554d416c6394436f4 Cleanups. diff -r f2ff364065eb -r f350c7514785 tools/fanalyze.c --- a/tools/fanalyze.c Mon Jun 17 10:26:47 2019 +0300 +++ b/tools/fanalyze.c Mon Jun 17 10:27:05 2019 +0300 @@ -10,14 +10,15 @@ #include "dmargs.h" #include "dmfile.h" -#define SET_MAX_FILES 64 -#define SET_MAX_ELEMS 256 -#define SET_MAX_VALUES 64 -#define SET_MAX_GREPLIST 64 +#define SET_MAX_FILES 64 +#define SET_MAX_ELEMS 256 #define SET_MAX_VARIANTS 4 -#define SET_MAX_SEQUENCES 1024 -#define SET_MAX_PLACES 1024 +#define SET_MAX_GREP_VALUES 64 +#define SET_MAX_GREP_LIST 64 + +#define SET_MAX_SEQUENCES 1024 +#define SET_MAX_PLACES 1024 /* Typedefs @@ -97,8 +98,8 @@ int type; int disp; int nvalues; - Uint32 values[SET_MAX_GREPLIST]; - BOOL vwildcards[SET_MAX_GREPLIST]; + Uint32 values[SET_MAX_GREP_LIST]; + BOOL vwildcards[SET_MAX_GREP_LIST]; } DMGrepValue; @@ -151,7 +152,7 @@ DMSourceFile srcFiles[SET_MAX_FILES]; // Source file names DMStats totalStats; int nsetGrepValues = 0; -DMGrepValue setGrepValues[SET_MAX_VALUES]; +DMGrepValue setGrepValues[SET_MAX_GREP_VALUES]; size_t optMinMatchLen = 8; DMMatchSeq dmSequences[SET_MAX_SEQUENCES]; @@ -364,7 +365,7 @@ char *vtmp = vstr; do { - if (val.nvalues >= SET_MAX_GREPLIST) + if (val.nvalues >= SET_MAX_GREP_LIST) { ret = dmError(DMERR_BOUNDS, "Too many greplist values specified '%s'.\n", @@ -452,7 +453,7 @@ val.type = DMGV_UINT8; } - if (nsetGrepValues < SET_MAX_VALUES) + if (nsetGrepValues < SET_MAX_GREP_VALUES) { DMGrepValue *node = &setGrepValues[nsetGrepValues++]; memcpy(node, &val, sizeof(val)); @@ -469,7 +470,7 @@ { ret = dmError(DMERR_BOUNDS, "Too many values specified (max %d).", - SET_MAX_VALUES); + SET_MAX_GREP_VALUES); } out: