refs.c: reindent get_submodule_ref_store()
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 <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nguyễn Thái Ngọc Duy committed
Aug 23, 2017 at 19:37 UTC
873ea90d61fa45ec91af3864c2e336bfe489d181
1 file changed
+5
-7
refs.c
+5
-7
@@ -1590,13 +1590,11 @@ struct ref_store *get_submodule_ref_store(const char *submodule)
1590
if (!submodule)
1591
return NULL;
1592
1593
- if (submodule) {
1594
- len = strlen(submodule);
1595
- while (len && is_dir_sep(submodule[len - 1]))
1596
- len--;
1597
- if (!len)
1598
- return NULL;
1599
- }
1593
+ len = strlen(submodule);
1594
+ while (len && is_dir_sep(submodule[len - 1]))
1595
+ len--;
1596
+ if (!len)
1597
+ return NULL;
1598
1599
if (submodule[len])
1600
/* We need to strip off one or more trailing slashes */