From c96e663b0a803aa405125712e517ccd6180b7154 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Mon, 26 Dec 2022 09:36:56 -0500 Subject: [PATCH] LibCompress: Add two missing return statements --- Userland/Libraries/LibCompress/Deflate.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibCompress/Deflate.cpp b/Userland/Libraries/LibCompress/Deflate.cpp index 9bd1ed07db..3b704340cb 100644 --- a/Userland/Libraries/LibCompress/Deflate.cpp +++ b/Userland/Libraries/LibCompress/Deflate.cpp @@ -415,7 +415,7 @@ ErrorOr DeflateDecompressor::decode_codes(CanonicalCode& literal_code, Opt auto literal_code_result = CanonicalCode::from_bytes(code_lengths.span().trim(literal_code_count)); if (!literal_code_result.has_value()) - Error::from_string_literal("Failed to decode the literal code"); + return Error::from_string_literal("Failed to decode the literal code"); literal_code = literal_code_result.value(); // Now we extract the code that was used to encode distances in the block. @@ -431,7 +431,7 @@ ErrorOr DeflateDecompressor::decode_codes(CanonicalCode& literal_code, Opt auto distance_code_result = CanonicalCode::from_bytes(code_lengths.span().slice(literal_code_count)); if (!distance_code_result.has_value()) - Error::from_string_literal("Failed to decode the distance code"); + return Error::from_string_literal("Failed to decode the distance code"); distance_code = distance_code_result.value(); return {};