diff --git a/data_structures/reverse_a_linked_list.cpp b/data_structures/reverse_a_linked_list.cpp index 2324cb645..806fd54fa 100644 --- a/data_structures/reverse_a_linked_list.cpp +++ b/data_structures/reverse_a_linked_list.cpp @@ -137,8 +137,9 @@ int list::last() { t = t->next; } return t->val; - } else + } else { return 0; + } } } // namespace linked_list } // namespace data_structures