From 49d3d5d3b7aa1a6022e06c3f0902e55377f75d1b Mon Sep 17 00:00:00 2001 From: Olivia Appleton Date: Tue, 3 Sep 2024 23:07:07 -0500 Subject: [PATCH] Reorder includes --- c/src/include/utils.h | 3 ++- c/test.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/c/src/include/utils.h b/c/src/include/utils.h index e4a5cc34..9a923565 100644 --- a/c/src/include/utils.h +++ b/c/src/include/utils.h @@ -90,11 +90,12 @@ char *get_data_file(const char *name) { } const size_t ret_code = fread(buffer, 1, length, file); - if (ret_code != length) + if (ret_code != length) { if (feof(file)) printf("Error reading %s: unexpected end of file, read %" PRIu64 " of %"PRIu64" bytes expected\n", name, (uint64_t)ret_code, (uint64_t)length); else if (ferror(file)) perror("Error reading data file"); + } buffer[length] = 0; fclose(file); diff --git a/c/test.c b/c/test.c index 3d7edfe0..4cc48d4f 100644 --- a/c/test.c +++ b/c/test.c @@ -1,8 +1,8 @@ #define UNITY_SUPPORT_TEST_CASES +#include "Unity/src/unity.h" #include #include #include "src/include/utils.h" -#include "Unity/src/unity.h" #include "src/p0001.c" #include "src/p0002.c" #include "src/p0003.c"