This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 2/2] Fix some errors which cause unnecessary rebases


Also add some parentheses for clarity
---
 rebase.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/rebase.c b/rebase.c
index 0aad1b2..1c8fe7a 100644
--- a/rebase.c
+++ b/rebase.c
@@ -750,8 +750,8 @@ merge_image_info ()
 	    }
 	  /* However, if the DLL got bigger and doesn't fit into its slot
 	     anymore, rebase this DLL from scratch. */
-	  if (i + 1 < img_info_rebase_start
-	      && cur_base + slot_size + offset >= img_info_list[i + 1].base)
+	  if ((i + 1 < img_info_rebase_start)
+	      && (cur_base + slot_size + offset > img_info_list[i + 1].base))
 	    {
 	      img_info_list[i].base = 0;
 	      if (verbose)
@@ -759,8 +759,8 @@ merge_image_info ()
 	    }
 	  /* Does the previous DLL reach into the address space of this
 	     DLL?  This happens if the previous DLL is not rebaseable. */
-	  else if (i > 0 && cur_base < img_info_list[i - 1].base
-				       + img_info_list[i + 1].slot_size)
+	  else if ((i > 0) && (cur_base < img_info_list[i - 1].base
+			       + img_info_list[i - 1].slot_size))
 	    {
 	      img_info_list[i].base = 0;
 	      if (verbose)
@@ -768,8 +768,8 @@ merge_image_info ()
 	    }
 	  /* Does the file match the base address requirements?  If not,
 	     rebase from scratch. */
-	  else if ((down_flag && cur_base + slot_size + offset >= image_base)
-		   || (!down_flag && cur_base < image_base))
+	  else if ((down_flag && (cur_base + slot_size + offset > image_base))
+		   || (!down_flag && (cur_base < image_base)))
 	    {
 	      img_info_list[i].base = 0;
 	      if (verbose)
-- 
2.16.1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]