Skip to content

Commit

Permalink
Remove C99-only structure initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
plusvic committed Nov 22, 2016
1 parent 09ffad3 commit 10a64a1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions yara.c
Original file line number Diff line number Diff line change
Expand Up @@ -999,6 +999,8 @@ int main(
int argc,
const char** argv)
{
COMPILER_RESULTS cr;

YR_COMPILER* compiler = NULL;
YR_RULES* rules = NULL;

Expand Down Expand Up @@ -1106,10 +1108,8 @@ int main(
exit_with_code(EXIT_FAILURE);
}

COMPILER_RESULTS cr = {
.errors = 0,
.warnings = 0
};
cr.errors = 0;
cr.warnings = 0;

yr_compiler_set_callback(compiler, print_compiler_error, &cr);

Expand Down
8 changes: 4 additions & 4 deletions yarac.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ int main(
int argc,
const char** argv)
{
COMPILER_RESULTS cr;

YR_COMPILER* compiler = NULL;
YR_RULES* rules = NULL;

Expand Down Expand Up @@ -229,10 +231,8 @@ int main(
if (!define_external_variables(compiler))
exit_with_code(EXIT_FAILURE);

COMPILER_RESULTS cr = {
.errors = 0,
.warnings = 0
};
cr.errors = 0;
cr.warnings = 0;

yr_compiler_set_callback(compiler, report_error, &cr);

Expand Down

0 comments on commit 10a64a1

Please sign in to comment.