statzone

DNS zone file analyzer targeted at TLD zones
Log | Files | Refs | README | LICENSE

commit 88af58f88ffb5cea2d813a14ff90ab1814958bce
parent 77e2d279fdcb1d515efe2aeaa3c922eb624047db
Author: Frederic Cambus <fred@statdns.com>
Date:   Mon,  8 Feb 2021 11:28:39 +0100

Get rid of most global variables, move all declarations to main().

Diffstat:
Msrc/statzone.c | 47+++++++++++++++++++++++------------------------
1 file changed, 23 insertions(+), 24 deletions(-)

diff --git a/src/statzone.c b/src/statzone.c @@ -35,32 +35,8 @@ #include "strtolower.h" struct timespec begin, end, elapsed; - -char lineBuffer[LINE_LENGTH_MAX]; - struct results results; -FILE *zoneFile; -struct stat zoneFileStat; - -int8_t getoptFlag; - -char *intputFile; - -char *domain; -char *previousDomain; -char *rdata; - -struct my_struct { - char *domain; - UT_hash_handle hh; -}; - -struct my_struct *signedDomains = NULL; -struct my_struct *ds; -struct my_struct *uniqueNS = NULL; -struct my_struct *ns; - static void usage() { @@ -86,6 +62,29 @@ summary() int main(int argc, char *argv[]) { + char lineBuffer[LINE_LENGTH_MAX]; + + FILE *zoneFile; + struct stat zoneFileStat; + + int8_t getoptFlag; + + char *intputFile; + + char *domain; + char *previousDomain; + char *rdata; + + struct my_struct { + char *domain; + UT_hash_handle hh; + }; + + struct my_struct *signedDomains = NULL; + struct my_struct *ds; + struct my_struct *uniqueNS = NULL; + struct my_struct *ns; + char *token = NULL; char *token_lc = NULL; int token_count;