[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[committed][NFC] Put for body between braces in write_dso



Hi,

This cosmetic change makes the following patch more minimal.

Committed to trunk.

Thanks,
- Tom

[NFC] Put for body between braces in write_dso

2019-06-27  Tom de Vries  <tdevries@suse.de>

	* dwz.c (write_dso): Put for body between braces.

---
 dwz.c | 36 +++++++++++++++++++-----------------
 1 file changed, 19 insertions(+), 17 deletions(-)

diff --git a/dwz.c b/dwz.c
index 4e14086..dd6da31 100644
--- a/dwz.c
+++ b/dwz.c
@@ -10670,24 +10670,26 @@ write_dso (DSO *dso, const char *file, struct stat *st)
 	  int l;
 	  for (l = 1, j = sorted_section_numbers[l]; l <= dso->ehdr.e_shnum;
 	       ++l, j = sorted_section_numbers[l])
-	    if (j == dso->ehdr.e_shnum)
-	      continue;
-	    else if (dso->shdr[j].sh_offset < min_shoff && !last_shoff)
-	      continue;
-	    else if ((dso->shdr[j].sh_flags & SHF_ALLOC) != 0)
-	      {
-		error (0, 0, "Allocatable section in %s after non-allocatable "
-			     "ones", dso->filename);
-		return 1;
-	      }
-	    else
-	      {
-		assert (dso->shdr[j].sh_offset >= last_shoff);
+	    {
+	      if (j == dso->ehdr.e_shnum)
+		continue;
+	      else if (dso->shdr[j].sh_offset < min_shoff && !last_shoff)
+		continue;
+	      else if ((dso->shdr[j].sh_flags & SHF_ALLOC) != 0)
+		{
+		  error (0, 0, "Allocatable section in %s after "
+			 "non-allocatable ones", dso->filename);
+		  return 1;
+		}
+	      else
+		{
+		  assert (dso->shdr[j].sh_offset >= last_shoff);
 
-		if (k == -1)
-		  k = l;
-		last_shoff = dso->shdr[j].sh_offset + dso->shdr[j].sh_size;
-	      }
+		  if (k == -1)
+		    k = l;
+		  last_shoff = dso->shdr[j].sh_offset + dso->shdr[j].sh_size;
+		}
+	    }
 	  last_shoff = min_shoff;
 	  for (l = k, j = sorted_section_numbers[l]; l <= dso->ehdr.e_shnum;
 	       ++l, j = sorted_section_numbers[l])