Skip to content

Commit

Permalink
allow space for EOF in test helper
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewjpage committed Mar 18, 2016
1 parent 34a629c commit 87d66b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/helper-methods.c
Expand Up @@ -45,14 +45,14 @@ int compare_files(char expected_output_filename[],char actual_output_filename[]
fseek(expected_output_fh, 0L, SEEK_END);
numbytes = ftell(expected_output_fh);
fseek(expected_output_fh, 0L, SEEK_SET);
expected_buffer = (char*)calloc(numbytes, sizeof(char));
expected_buffer = (char*)calloc(numbytes +1, sizeof(char));
fsize_expected = fread(expected_buffer, sizeof(char), numbytes, expected_output_fh);
fclose(expected_output_fh);

fseek(actual_output_fh, 0L, SEEK_END);
numbytes = ftell(actual_output_fh);
fseek(actual_output_fh, 0L, SEEK_SET);
actual_buffer = (char*)calloc(numbytes, sizeof(char));
actual_buffer = (char*)calloc(numbytes +1, sizeof(char));
fsize_actual = fread(actual_buffer, sizeof(char), numbytes, actual_output_fh);
fclose(actual_output_fh);

Expand Down

0 comments on commit 87d66b0

Please sign in to comment.