From d09236dcc55e9674ba0c76886b3ca472dfae3dc1 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Sat, 10 Mar 2012 23:30:11 -0600 Subject: [PATCH] Bugfix: set error code to invalid parameter when parameters are missing --- level_3/fss_basic_list_read/c/fss_basic_list_read.c | 1 + level_3/fss_basic_read/c/fss_basic_read.c | 1 + level_3/fss_extended_read/c/fss_extended_read.c | 1 + 3 files changed, 3 insertions(+) diff --git a/level_3/fss_basic_list_read/c/fss_basic_list_read.c b/level_3/fss_basic_list_read/c/fss_basic_list_read.c index 5eca541..a062363 100644 --- a/level_3/fss_basic_list_read/c/fss_basic_list_read.c +++ b/level_3/fss_basic_list_read/c/fss_basic_list_read.c @@ -295,6 +295,7 @@ extern "C"{ } // for } else { fl_print_color_line(f_standard_error, data->context.error, data->context.reset, "ERROR: you failed to specify one or more files"); + status = f_invalid_parameter; } fss_basic_list_read_delete_data(data); diff --git a/level_3/fss_basic_read/c/fss_basic_read.c b/level_3/fss_basic_read/c/fss_basic_read.c index 5b61a11..58a81fa 100644 --- a/level_3/fss_basic_read/c/fss_basic_read.c +++ b/level_3/fss_basic_read/c/fss_basic_read.c @@ -287,6 +287,7 @@ extern "C"{ } } else { fl_print_color_line(f_standard_error, data->context.error, data->context.reset, "ERROR: you failed to specify one or more files"); + status = f_invalid_parameter; } fss_basic_read_delete_data(data); diff --git a/level_3/fss_extended_read/c/fss_extended_read.c b/level_3/fss_extended_read/c/fss_extended_read.c index eefbf47..e5dde61 100644 --- a/level_3/fss_extended_read/c/fss_extended_read.c +++ b/level_3/fss_extended_read/c/fss_extended_read.c @@ -294,6 +294,7 @@ extern "C"{ } // for } else { fl_print_color_line(f_standard_error, data->context.error, data->context.reset, "ERROR: you failed to specify one or more files"); + status = f_invalid_parameter; } fss_extended_read_delete_data(data); -- 1.8.3.1