From 6349c99dddf75bed5c43a09b0bf44d5ef140dd8b Mon Sep 17 00:00:00 2001 From: Unbewohnte Date: Sun, 9 Apr 2023 18:58:42 +0300 Subject: [PATCH] Renamed CorruptError to a more appropriate CorruptResult --- corrupt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/corrupt.c b/corrupt.c index 5f72771..5954127 100644 --- a/corrupt.c +++ b/corrupt.c @@ -24,10 +24,10 @@ typedef enum Corruption { } Corruption; // Possible funcion errors -typedef enum CorruptError { +typedef enum CorruptResult { SUCCESS, ERR_NULLPTR, -} CorruptError; +} CorruptResult; // Corrupts byte via bit manipulation @@ -42,7 +42,7 @@ int corrupt_char(int byte) { Corrupts the file with specified corruption method. Returns 0 if successful, 1 - if FILE is NULL. */ -CorruptError corrupt(FILE* file, Corruption corruption) { +CorruptResult corrupt(FILE* file, Corruption corruption) { if (!file) { return ERR_NULLPTR; } else if (feof(file)) { @@ -80,7 +80,7 @@ int main(int argc, char** argv) { unsigned int file_path_index = 0; FILE* file = NULL; Corruption corruption_method = CORRUPTION_BITMAGIC; - CorruptError result; + CorruptResult result; unsigned int i = 1; while (i < argc) {