statzone

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

commit 953bbf10c8161d9a87adb9e67cd8335223410828
parent 3c24edeeb4696c17a970b86f07fd4642af8dc95c
Author: Frederic Cambus <fred@statdns.com>
Date:   Mon, 25 Mar 2019 12:17:39 +0100

Count parsed tokens within a processed zone file line.

Diffstat:
Msrc/statzone.c | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/statzone.c b/src/statzone.c @@ -69,6 +69,7 @@ int main(int argc, char *argv[]) { char *token = NULL; char *token_lc = NULL; + int token_count; if (pledge("stdio rpath", NULL) == -1) { err(1, "pledge"); @@ -126,8 +127,9 @@ main(int argc, char *argv[]) { continue; if (*lineBuffer) { + token_count = 0; token = strtok(lineBuffer, " \t"); - + if (token) domain = strtolower(token); @@ -193,6 +195,7 @@ main(int argc, char *argv[]) { } token = strtok(NULL, " \t"); + token_count++; } }