diff options
| author | Joseph Hunkeler <jhunkeler@users.noreply.github.com> | 2026-04-23 13:48:57 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-04-23 13:48:57 -0400 |
| commit | 017bc273aedf3f20512beeb78a2f513913e56305 (patch) | |
| tree | 8450c64203a0b85d8e447974417c1bebce64fb3e /tests | |
| parent | d91c7bd6a35e2d979aeb1c2d11c6d8a21b57e173 (diff) | |
| parent | 3c343e07936414981d5157b9713ff9b774b57fc5 (diff) | |
| download | stasis-017bc273aedf3f20512beeb78a2f513913e56305.tar.gz | |
Merge pull request #136 from jhunkeler/cmake-git-version-fixups
Bug Hunt 0x1000
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/include/testing.h | 3 | ||||
| -rw-r--r-- | tests/test_utils.c | 1 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/include/testing.h b/tests/include/testing.h index 6fa5ca6..80d5aa2 100644 --- a/tests/include/testing.h +++ b/tests/include/testing.h @@ -115,8 +115,7 @@ inline char *stasis_testing_read_ascii(const char *filename) { } inline int stasis_testing_write_ascii(const char *filename, const char *data) { - FILE *fp; - fp = fopen(filename, "w+"); + FILE *fp = fopen(filename, "w+"); if (!fp) { perror(filename); return -1; diff --git a/tests/test_utils.c b/tests/test_utils.c index 7361139..a5faf5c 100644 --- a/tests/test_utils.c +++ b/tests/test_utils.c @@ -279,6 +279,7 @@ void test_file_readlines() { } if (fwrite(data, sizeof(*data), strlen(data), fp) != strlen(data)) { perror("short write"); + fclose(fp); return; } fclose(fp); |
