]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Modernize coding style: Avoid 'continue;' statements where possible.
authorBruno Haible <bruno@clisp.org>
Fri, 12 Dec 2025 10:24:14 +0000 (11:24 +0100)
committerBruno Haible <bruno@clisp.org>
Fri, 12 Dec 2025 10:24:14 +0000 (11:24 +0100)
* gnulib-local/lib/backupfile.c (max_backup_version): Use if/else instead of
'continue;'.
* gnulib-local/lib/markup.c (emit_start_element): Likewise.

gnulib-local/lib/backupfile.c
gnulib-local/lib/markup.c

index 15595c16a4a2f6c4e0e0b68b15b8aa5e735f0841..17fe775367679948229c62e9265e42949f9d13fd 100644 (file)
@@ -1,5 +1,5 @@
 /* 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
    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)
     {
-      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);
-      if (this_version > highest_version)
-        highest_version = this_version;
+      if (REAL_DIR_ENTRY (dp) && strlen (dp->d_name) >= file_name_length + 4)
+        {
+          this_version = version_number (file, dp->d_name, file_name_length);
+          if (this_version > highest_version)
+            highest_version = this_version;
+        }
     }
   if (closedir (dirp))
     return 0;
index f182ab665341634ba857410d629244ae925875c8..8479ef7ccebd2218c9d939b86bee25371fad3a21 100644 (file)
@@ -833,13 +833,13 @@ emit_start_element (markup_parse_context_ty *context)
   for (i = 0; i < context->cur_attr + 1; i++)
     {
       /* Possibly omit qualified attribute names from the list */
-      if ((context->flags & MARKUP_IGNORE_QUALIFIED)
-          && strchr (context->attr_names[i], ':'))
-        continue;
-
-      attr_names[j] = context->attr_names[i];
-      attr_values[j] = context->attr_values[i];
-      j++;
+      if (!((context->flags & MARKUP_IGNORE_QUALIFIED)
+            && strchr (context->attr_names[i], ':')))
+        {
+          attr_names[j] = context->attr_names[i];
+          attr_values[j] = context->attr_values[i];
+          j++;
+        }
     }
   attr_names[j] = NULL;
   attr_values[j] = NULL;