commit fcde2b523d716a530f9a2a579a9373206c661218
parent 85ed02fda5cf05b751bc100e852bbc0917dd964f
Author: David DiPaola <DavidDiPaola@users.noreply.github.com>
Date: Mon, 31 Dec 2018 21:48:16 -0500
clarified error codes
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/main.c b/main.c
@@ -21,11 +21,11 @@ main(int argc, char * argv[]) {
if ((start_year < DATA_STARTYEAR) || (start_year > DATA_ENDYEAR)) {
fprintf(stderr, "ERROR: start year: %i is invalid. valid years are %i-%i" "\n", start_year, DATA_STARTYEAR, DATA_ENDYEAR);
- return 5;
+ return 2;
}
if ((end_year < DATA_STARTYEAR) || (end_year > DATA_ENDYEAR)) {
fprintf(stderr, "ERROR: end year: %i is invalid. valid years are %i-%i" "\n", end_year, DATA_STARTYEAR, DATA_ENDYEAR);
- return 5;
+ return 3;
}
float ratio = DATA[end_year-DATA_STARTYEAR] / DATA[start_year-DATA_STARTYEAR];