Skip to content

Commit

Permalink
Properly initialize kyua_tap_summary_t
Browse files Browse the repository at this point in the history
As I didn't write an initialization function for this data type (bad
me), all locations instantiating it must be careful to file in all
details correctly.  Do so now.

This fixes breakage observed in NetBSD.
  • Loading branch information
jmmv committed Nov 27, 2013
1 parent 05583ef commit d6f8d5c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tap_parser_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,9 @@ ATF_TC_BODY(parse__ok__pass, tc)
"garbage line\n"
"ok - 3 This test passed\n";

kyua_tap_summary_t summary;
kyua_tap_summary_t summary; memset(&summary, 0, sizeof(summary));
summary.parse_error = NULL;
summary.bail_out = false;
summary.first_index = 1;
summary.last_index = 3;
summary.ok_count = 3;
Expand All @@ -124,8 +125,9 @@ ATF_TC_BODY(parse__ok__fail, tc)
"not ok - 4 This test failed\n"
"ok - 5 This test passed\n";

kyua_tap_summary_t summary;
kyua_tap_summary_t summary; memset(&summary, 0, sizeof(summary));
summary.parse_error = NULL;
summary.bail_out = false;
summary.first_index = 1;
summary.last_index = 5;
summary.ok_count = 2;
Expand Down

0 comments on commit d6f8d5c

Please sign in to comment.