commit 7328f0d31434acff383dbf3669b33efcb1754f2d
parent c50d1fb47027f2d9613e6922644e8e53380a72bc
Author: Frederic Cambus <fred@statdns.com>
Date: Wed, 10 Jun 2020 16:19:18 +0200
Introduce the displaySummary() function, and use it to print summary.
Diffstat:
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/statzone.c b/src/statzone.c
@@ -4,7 +4,7 @@
* https://www.statdns.com
*
* Created: 2012-02-13
- * Last Updated: 2020-06-09
+ * Last Updated: 2020-06-10
*
* StatZone is released under the BSD 2-Clause license
* See LICENSE file for details.
@@ -72,6 +72,13 @@ displayUsage()
" -v Display version\n");
}
+void
+displaySummary()
+{
+ fprintf(stderr, "Processed %" PRIu64 " lines in %f seconds.\n",
+ results.processedLines, results.runtime);
+}
+
int
main(int argc, char *argv[])
{
@@ -256,7 +263,7 @@ main(int argc, char *argv[])
fprintf(stdout, "%" PRIu64 "\n", results.domains);
/* Printing results */
- fprintf(stderr, "Processed %" PRIu64 " lines in %f seconds.\n", results.processedLines, results.runtime);
+ displaySummary();
/* Clean up */
fclose(zoneFile);