Add missing explicit returns to 2 more functions

- stop_second_instance (line 1851) - Added return 0 before closing brace
- detect_recovery_level_from_errors (line 1076) - Added return 0 after echo

Both functions had no explicit return statements. While these don't cause
immediate exit-to-terminal like the step functions, they violate best practice
of always having explicit returns.

Severity: HIGH
Impact: Consistency and future-proofing

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
cschantz
2026-02-27 19:13:19 -05:00
parent e1e2b61ecf
commit f1ca6e83d7
+2
View File
@@ -1072,6 +1072,7 @@ detect_recovery_level_from_errors() {
fi fi
echo "$recommended_level|$error_type" echo "$recommended_level|$error_type"
return 0
} }
# Check error log for InnoDB startup issues (returns error type) # Check error log for InnoDB startup issues (returns error type)
@@ -1847,6 +1848,7 @@ stop_second_instance() {
# Mark as no longer running # Mark as no longer running
SECOND_INSTANCE_RUNNING=0 SECOND_INSTANCE_RUNNING=0
return 0
} }
# Validate SQL dump integrity # Validate SQL dump integrity