From 873ea90d61fa45ec91af3864c2e336bfe489d181 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Wed, 23 Aug 2017 19:37:04 +0700 Subject: refs.c: reindent get_submodule_ref_store() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With the new "if (!submodule) return NULL;" code added in the previous commit, we don't need to check if submodule is not NULL anymore. Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- refs.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/refs.c b/refs.c index a0c5078901..206af61d62 100644 --- a/refs.c +++ b/refs.c @@ -1590,13 +1590,11 @@ struct ref_store *get_submodule_ref_store(const char *submodule) if (!submodule) return NULL; - if (submodule) { - len = strlen(submodule); - while (len && is_dir_sep(submodule[len - 1])) - len--; - if (!len) - return NULL; - } + len = strlen(submodule); + while (len && is_dir_sep(submodule[len - 1])) + len--; + if (!len) + return NULL; if (submodule[len]) /* We need to strip off one or more trailing slashes */ -- cgit v1.2.1