From 13af5aefd60e3650a5d570f8bd6d37d884061c4d Mon Sep 17 00:00:00 2001 From: Hammy Date: Fri, 31 Dec 2021 09:32:09 +0000 Subject: [PATCH] Return ERRNO_003 for improved readability --- src/list.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/list.c b/src/list.c index f7ba7fc..d79b54a 100644 --- a/src/list.c +++ b/src/list.c @@ -140,12 +140,12 @@ int List_reverse(List *list) { for (int i = 0, j = list->_currentSize; i < j; i++, j--) { int element = List_get(list, j); if (element == ERRNO_003) { - return element; + return ERRNO_003; } int previousElement = List_insert(list, i, element); if (previousElement == ERRNO_003) { - return element; + return ERRNO_003; } if (List_insert(list, j, previousElement) == ERRNO_003) {