From 6d6dd6de8a4e17b641e8a73fae612b37c8e8602a Mon Sep 17 00:00:00 2001 From: tlatorre Date: Fri, 14 Jun 2019 17:16:37 -0500 Subject: fix empty list item at top of YAML file The first logical record in the SNOCR files don't have an EV bank which was causing the output file to have an emtpy list element. This commit fixes the issue by checking for an empty EV bank before printing the list delimiter. --- src/fit.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/fit.c b/src/fit.c index 29b5957..adaaaef 100644 --- a/src/fit.c +++ b/src/fit.c @@ -6030,6 +6030,11 @@ int main(int argc, char **argv) goto err; } + if (bmast.links[KMAST_EV-1] == 0) { + /* First logical record in SNOCR files don't have an EV bank. */ + continue; + } + if (fout) fprintf(fout, " -\n"); if (bmast.links[KMAST_MC-1] == 0) goto skip_mc; @@ -6128,11 +6133,6 @@ int main(int argc, char **argv) skip_mc: - if (bmast.links[KMAST_EV-1] == 0) { - /* First logical record in SNOCR files doesn't have an EV bank. */ - continue; - } - rv = zebra_get_bank(f,&b,bmast.links[KMAST_EV-1]); if (rv) { -- cgit