So we have less return handling code.

Signed-off-by: Heiko Voigt <hvo...@hvoigt.net>
---
 submodule-config.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/submodule-config.c b/submodule-config.c
index 853989e..cb9bf8f 100644
--- a/submodule-config.c
+++ b/submodule-config.c
@@ -416,12 +416,7 @@ static const struct submodule *config_from(struct 
submodule_cache *cache,
        }
 
        config = read_sha1_file(sha1, &type, &config_size);
-       if (!config) {
-               strbuf_release(&rev);
-               return NULL;
-       }
-
-       if (type != OBJ_BLOB) {
+       if (!config || type != OBJ_BLOB) {
                strbuf_release(&rev);
                free(config);
                return NULL;
-- 
2.4.2.387.gf86f31a

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to