There is an optimization used that immediately prints 0 and returns if there is no matching data on load.
The problem is that the caller isn't told that it should stop processing because F_none is returned.
Remove the optimization rather than implementing a custom return code and changing the code to handle this.
The normal code is still run and still correctly determines that there are 0 Objects.
}
if (status == F_data_not_stop || status == F_data_not_eos) {
- if (data->option & fss_basic_list_read_data_option_total_d) {
- f_file_stream_lock(main->output.to);
-
- fss_basic_list_read_print_zero(main);
-
- f_file_stream_unlock(main->output.to);
-
- return F_none;
- }
+ if (data->option & fss_basic_list_read_data_option_total_d) return F_none;
return F_status_set_warning(status);
}
}
if (status == F_data_not_stop || status == F_data_not_eos) {
- if (data->option & fss_basic_read_data_option_total_d) {
- fss_basic_read_print_zero(main);
-
- return F_none;
- }
+ if (data->option & fss_basic_read_data_option_total_d) return F_none;
return F_status_set_warning(status);
}
}
if (status == F_data_not_stop || status == F_data_not_eos) {
- if (data->option & fss_extended_list_read_data_option_total_d) {
- fss_extended_list_read_print_zero(main);
-
- return F_none;
- }
+ if (data->option & fss_extended_list_read_data_option_total_d) return F_none;
return F_status_set_warning(status);
}
}
if (status == F_data_not_stop || status == F_data_not_eos) {
- if (data->option & fss_extended_read_data_option_total_d) {
- fss_extended_read_print_zero(main);
-
- return F_none;
- }
+ if (data->option & fss_extended_read_data_option_total_d) return F_none;
return F_status_set_warning(status);
}
}
if (status == F_data_not_stop || status == F_data_not_eos) {
- if (data->option & fss_payload_read_data_option_total_d) {
- f_file_stream_lock(main->output.to);
-
- fss_payload_read_print_zero(main);
-
- f_file_stream_unlock(main->output.to);
-
- return F_none;
- }
+ if (data->option & fss_payload_read_data_option_total_d) return F_none;
return F_status_set_warning(status);
}