vim-patch:partial:9.0.1196: code is indented more than necessary (#27315)

Problem:    Code is indented more than necessary.
Solution:   Use an early return where it makes sense. (Yegappan Lakshmanan,
            closes vim/vim#11813)

e857598896

Skip list_alloc_with_items().

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
This commit is contained in:
zeertzjq
2024-02-03 10:22:11 +08:00
committed by GitHub
parent 1f40b4e222
commit 9ab9cde2ca
5 changed files with 74 additions and 60 deletions

View File

@@ -80,17 +80,21 @@ static char *get_mess_env(void)
return get_locale_val(LC_MESSAGES);
#else
char *p = (char *)os_getenv("LC_ALL");
if (p != NULL) {
return p;
}
p = (char *)os_getenv("LC_MESSAGES");
if (p != NULL) {
return p;
}
p = (char *)os_getenv("LANG");
if (p != NULL && ascii_isdigit(*p)) {
p = NULL; // ignore something like "1043"
}
if (p == NULL) {
p = (char *)os_getenv("LC_MESSAGES");
if (p == NULL) {
p = (char *)os_getenv("LANG");
if (p != NULL && ascii_isdigit(*p)) {
p = NULL; // ignore something like "1043"
}
if (p == NULL) {
p = get_locale_val(LC_CTYPE);
}
}
p = get_locale_val(LC_CTYPE);
}
return p;
#endif