mirror of
https://https.git.savannah.gnu.org/git/gettext.git
synced 2026-01-26 07:37:57 +00:00
Modernize coding style: Avoid 'continue;' statements where possible.
* gnulib-local/lib/backupfile.c (max_backup_version): Use if/else instead of 'continue;'. * gnulib-local/lib/markup.c (emit_start_element): Likewise.
This commit is contained in:
parent
abb256e01e
commit
a5c1a7f6c1
@ -1,5 +1,5 @@
|
|||||||
/* backupfile.c -- make Emacs style backup file names
|
/* backupfile.c -- make Emacs style backup file names
|
||||||
Copyright (C) 1990-2003, 2005-2006, 2012, 2020 Free Software Foundation, Inc.
|
Copyright (C) 1990-2003, 2005-2006, 2012, 2020, 2025 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -149,12 +149,12 @@ max_backup_version (const char *file, const char *dir)
|
|||||||
|
|
||||||
while ((dp = readdir (dirp)) != 0)
|
while ((dp = readdir (dirp)) != 0)
|
||||||
{
|
{
|
||||||
if (!REAL_DIR_ENTRY (dp) || strlen (dp->d_name) < file_name_length + 4)
|
if (REAL_DIR_ENTRY (dp) && strlen (dp->d_name) >= file_name_length + 4)
|
||||||
continue;
|
{
|
||||||
|
this_version = version_number (file, dp->d_name, file_name_length);
|
||||||
this_version = version_number (file, dp->d_name, file_name_length);
|
if (this_version > highest_version)
|
||||||
if (this_version > highest_version)
|
highest_version = this_version;
|
||||||
highest_version = this_version;
|
}
|
||||||
}
|
}
|
||||||
if (closedir (dirp))
|
if (closedir (dirp))
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@ -833,13 +833,13 @@ emit_start_element (markup_parse_context_ty *context)
|
|||||||
for (i = 0; i < context->cur_attr + 1; i++)
|
for (i = 0; i < context->cur_attr + 1; i++)
|
||||||
{
|
{
|
||||||
/* Possibly omit qualified attribute names from the list */
|
/* Possibly omit qualified attribute names from the list */
|
||||||
if ((context->flags & MARKUP_IGNORE_QUALIFIED)
|
if (!((context->flags & MARKUP_IGNORE_QUALIFIED)
|
||||||
&& strchr (context->attr_names[i], ':'))
|
&& strchr (context->attr_names[i], ':')))
|
||||||
continue;
|
{
|
||||||
|
attr_names[j] = context->attr_names[i];
|
||||||
attr_names[j] = context->attr_names[i];
|
attr_values[j] = context->attr_values[i];
|
||||||
attr_values[j] = context->attr_values[i];
|
j++;
|
||||||
j++;
|
}
|
||||||
}
|
}
|
||||||
attr_names[j] = NULL;
|
attr_names[j] = NULL;
|
||||||
attr_values[j] = NULL;
|
attr_values[j] = NULL;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user