Automatic date update in version.in
[deliverable/binutils-gdb.git] / bfd / elfxx-riscv.c
index fdcf9028ab5c1d219d627cfe7bf9d5c2506e436e..b15fdee9c7139c95582bb78ebc044826d402c903 100644 (file)
@@ -1244,9 +1244,7 @@ riscv_get_prefix_class (const char *arch)
 {
   switch (*arch)
     {
-    case 's':
-      return RV_ISA_CLASS_S;
-
+    case 's': return RV_ISA_CLASS_S;
     case 'x': return RV_ISA_CLASS_X;
     case 'z': return RV_ISA_CLASS_Z;
     default: return RV_ISA_CLASS_UNKNOWN;
@@ -1324,8 +1322,8 @@ riscv_parse_prefixed_ext (riscv_parse_subset_t *rps,
 
       /* Check that the name is valid.
         For 'x', anything goes but it cannot simply be 'x'.
-        For 'z', it must be known from a list and also cannot simply be 'z'.
-        For 's', it must be known from a list and also *can* simply be 's'.  */
+        For 's', it must be known from a list and cannot simply be 's'.
+        For 'z', it must be known from a list and cannot simply be 'z'.  */
 
       /* Check that the extension name is well-formed.  */
       if (!config->ext_valid_p (subset))
@@ -1403,11 +1401,11 @@ static bfd_boolean
 riscv_multi_letter_ext_valid_p (const char *ext,
                                const char *const *known_exts)
 {
-  for (size_t i = 0; known_exts[i]; ++i)
-    {
-      if (!strcmp (ext, known_exts[i]))
-       return TRUE;
-    }
+  size_t i;
+
+  for (i = 0; known_exts[i]; ++i)
+    if (!strcmp (ext, known_exts[i]))
+      return TRUE;
 
   return FALSE;
 }
@@ -1466,6 +1464,7 @@ riscv_parse_subset (riscv_parse_subset_t *rps,
                    const char *arch)
 {
   const char *p = arch;
+  size_t i;
 
   if (strncmp (p, "rv32", 4) == 0)
     {
@@ -1492,7 +1491,7 @@ riscv_parse_subset (riscv_parse_subset_t *rps,
 
   /* Parse the different classes of extensions in the specified order.  */
 
-  for (size_t i = 0; i < ARRAY_SIZE (parse_config); ++i) {
+  for (i = 0; i < ARRAY_SIZE (parse_config); ++i) {
     p = riscv_parse_prefixed_ext (rps, arch, p, &parse_config[i]);
 
     if (p == NULL)
This page took 0.027765 seconds and 4 git commands to generate.