1
0
forked from aniani/vim

patch 9.0.1246: code is indented more than necessary

Problem:    Code is indented more than necessary.
Solution:   Use an early return where it makes sense. (Yegappan Lakshmanan,
            closes #11887)
This commit is contained in:
Yegappan Lakshmanan
2023-01-26 12:00:00 +00:00
committed by Bram Moolenaar
parent 032713f829
commit 142ed77898
13 changed files with 510 additions and 515 deletions

View File

@@ -57,26 +57,26 @@ char *longVersion = NULL;
void
init_longVersion(void)
{
if (longVersion == NULL)
{
#ifdef BUILD_DATE
char *date_time = BUILD_DATE;
#else
char *date_time = __DATE__ " " __TIME__;
#endif
char *msg = _("%s (%s, compiled %s)");
size_t len = strlen(msg)
+ strlen(VIM_VERSION_LONG_ONLY)
+ strlen(VIM_VERSION_DATE_ONLY)
+ strlen(date_time);
if (longVersion != NULL)
return;
longVersion = alloc(len);
if (longVersion == NULL)
longVersion = VIM_VERSION_LONG;
else
vim_snprintf(longVersion, len, msg,
VIM_VERSION_LONG_ONLY, VIM_VERSION_DATE_ONLY, date_time);
}
#ifdef BUILD_DATE
char *date_time = BUILD_DATE;
#else
char *date_time = __DATE__ " " __TIME__;
#endif
char *msg = _("%s (%s, compiled %s)");
size_t len = strlen(msg)
+ strlen(VIM_VERSION_LONG_ONLY)
+ strlen(VIM_VERSION_DATE_ONLY)
+ strlen(date_time);
longVersion = alloc(len);
if (longVersion == NULL)
longVersion = VIM_VERSION_LONG;
else
vim_snprintf(longVersion, len, msg,
VIM_VERSION_LONG_ONLY, VIM_VERSION_DATE_ONLY, date_time);
}
# endif
#else
@@ -695,6 +695,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1246,
/**/
1245,
/**/