From bfc881b65892ddc4899e9ecc13f97102dad70c55 Mon Sep 17 00:00:00 2001 From: Intel A80486DX2-66 Date: Wed, 20 Nov 2024 02:07:50 +0300 Subject: [PATCH] file_type.c: rename function `is_valid_file` to `validate_file` --- src/file_type.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/file_type.c b/src/file_type.c index 77db358..147f5e5 100644 --- a/src/file_type.c +++ b/src/file_type.c @@ -2,7 +2,7 @@ /* macros: lambdas */ #define FILE_TYPE_CHECK_RET(ext, type) do { \ - enum file_validation_status status = is_valid_file(file, type); \ + enum file_validation_status status = validate_file(file, type); \ \ if (status == FILE_IO_ERROR) \ return FILE_TYPE_ERROR; \ @@ -22,7 +22,7 @@ /* function definitions */ static enum file_validation_status header_check(FILE* file, const char* id, size_t length); -static enum file_validation_status is_valid_file(FILE* file, file_type_t type); +static enum file_validation_status validate_file(FILE* file, file_type_t type); /* function implementations */ static enum file_validation_status header_check(FILE* file, const char* id, @@ -41,7 +41,7 @@ static enum file_validation_status header_check(FILE* file, const char* id, return VALID_FILE; } -static enum file_validation_status is_valid_file(FILE* file, file_type_t type) { +static enum file_validation_status validate_file(FILE* file, file_type_t type) { switch (type) { case FILE_TYPE_BMP: return header_check(file, "BM", 2); case FILE_TYPE_WAV: return header_check(file, "RIFF", 4);