From 89b7fb538097bde4432ea510349a5e4e4ca34b1b Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 21 Jan 2016 02:41:29 +0100 Subject: [PATCH] (content.c) Create error goto --- content.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/content.c b/content.c index 9d4fbc57db..56359addcc 100644 --- a/content.c +++ b/content.c @@ -216,12 +216,7 @@ static bool content_load_state(const char *path) path); if (!ret || size < 0) - { - RARCH_ERR("%s \"%s\".\n", - msg_hash_to_str(MSG_FAILED_TO_LOAD_STATE), - path); - return false; - } + goto error; RARCH_LOG("%s: %u %s.\n", msg_hash_to_str(MSG_STATE_SIZE), @@ -280,6 +275,12 @@ static bool content_load_state(const char *path) free(blocks); free(buf); return ret; + +error: + RARCH_ERR("%s \"%s\".\n", + msg_hash_to_str(MSG_FAILED_TO_LOAD_STATE), + path); + return false; } /**