statzone

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

commit 960d82eb105f5f2829f3cf9d0d82cba9f526aab3
parent dca85a134aee28c61a89ae99456ca2624633826b
Author: Frederic Cambus <fred@statdns.com>
Date:   Thu,  9 May 2019 14:59:31 +0200

Use EXIT_SUCCESS and EXIT_FAILURE macros for return values.

Diffstat:
Msrc/statzone.c | 14+++++++-------
1 file changed, 7 insertions(+), 7 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: 2019-03-27 + * Last Updated: 2019-05-09 * * StatZone is released under the BSD 2-Clause license * See LICENSE file for details. @@ -80,11 +80,11 @@ main(int argc, char *argv[]) { case 'h': displayUsage(); - return 0; + return EXIT_SUCCESS; case 'v': printf("%s\n", VERSION); - return 0; + return EXIT_SUCCESS; } } @@ -92,7 +92,7 @@ main(int argc, char *argv[]) { intputFile = argv[optind]; } else { displayUsage(); - return 0; + return EXIT_SUCCESS; } argc -= optind; @@ -109,14 +109,14 @@ main(int argc, char *argv[]) { /* Attempt to read from file */ if (!(zoneFile = fopen(intputFile, "r"))) { perror("Can't open log file"); - return 1; + return EXIT_FAILURE; } } /* Get log file size */ if (fstat(fileno(zoneFile), &zoneFileStat)) { perror("Can't stat log file"); - return 1; + return EXIT_FAILURE; } while (fgets(lineBuffer, LINE_LENGTH_MAX, zoneFile)) { @@ -238,5 +238,5 @@ main(int argc, char *argv[]) { /* Clean up */ fclose(zoneFile); - return 0; + return EXIT_SUCCESS; }