From 716c71b7857b8671189fb86f6b432aefd58cba6d Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Wed, 30 Mar 2022 19:20:06 -0500 Subject: [PATCH] Update: Remove redundant F_status_set_error() when returning status with an error. --- level_1/fl_utf_file/c/utf_file.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/level_1/fl_utf_file/c/utf_file.c b/level_1/fl_utf_file/c/utf_file.c index 4d1718a..b54da70 100644 --- a/level_1/fl_utf_file/c/utf_file.c +++ b/level_1/fl_utf_file/c/utf_file.c @@ -222,7 +222,7 @@ extern "C" { } const f_status_t status = private_fl_utf_file_write_until(file, destination.string, destination.used, written); - if (F_status_is_error(status)) return F_status_set_error(status); + if (F_status_is_error(status)) return status; if (status == F_none && *written == destination.used) { return F_none_eos; @@ -259,7 +259,7 @@ extern "C" { } const f_status_t status = private_fl_utf_file_write_until(file, destination.string, write_max, written); - if (F_status_is_error(status)) return F_status_set_error(status); + if (F_status_is_error(status)) return status; if (status == F_none && *written == destination.used) { return F_none_eos; @@ -296,7 +296,7 @@ extern "C" { } const f_status_t status = private_fl_utf_file_write_until(file, destination.string, write_max, written); - if (F_status_is_error(status)) return F_status_set_error(status); + if (F_status_is_error(status)) return status; if (status == F_none && *written == destination.used) { return F_none_eos; @@ -335,7 +335,7 @@ extern "C" { } const f_status_t status = private_fl_utf_file_write_until(file, destination.string + range.start, write_max, written); - if (F_status_is_error(status)) return F_status_set_error(status); + if (F_status_is_error(status)) return status; if (status == F_none) { if (range.start + *written == total) { -- 1.8.3.1