public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Andreas Arnez <arnez@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb] gdb/testsuite: Fix typos in infcall-nested-structs.c
Date: Thu, 10 Oct 2019 10:23:00 -0000	[thread overview]
Message-ID: <20191010102325.112840.qmail@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6dfc00411292aa3220b33b6ac9553907e3933b0f

commit 6dfc00411292aa3220b33b6ac9553907e3933b0f
Author: Andreas Arnez <arnez@linux.ibm.com>
Date:   Thu Oct 10 12:22:49 2019 +0200

    gdb/testsuite: Fix typos in infcall-nested-structs.c
    
    Some of the comparison functions in infcall-nested-structs.c contain
    redundant comparisons like a.<some_field> == a.<some_field> instead of
    a.<some_field> == b.<some_field>.  They were introduced with this commit:
    
      36eb4c5f9bbe6 - "infcall-nested-structs: Test up to five fields"
    
    Fix the redundant comparisons.
    
    gdb/testsuite/ChangeLog:
    
    	* gdb.base/infcall-nested-structs.c (cmp_struct_02_01)
    	(cmp_struct_02_02, cmp_struct_04_01, cmp_struct_04_02)
    	(cmp_struct_05_01, cmp_struct_static_02_01)
    	(cmp_struct_static_04_01, cmp_struct_static_06_01): Fix redundant
    	comparisons.

Diff:
---
 gdb/testsuite/ChangeLog                         |  8 ++++++++
 gdb/testsuite/gdb.base/infcall-nested-structs.c | 20 ++++++++++----------
 2 files changed, 18 insertions(+), 10 deletions(-)

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index aa57a85..2ea7ffb 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,11 @@
+2019-10-10  Andreas Arnez  <arnez@linux.ibm.com>
+
+	* gdb.base/infcall-nested-structs.c (cmp_struct_02_01)
+	(cmp_struct_02_02, cmp_struct_04_01, cmp_struct_04_02)
+	(cmp_struct_05_01, cmp_struct_static_02_01)
+	(cmp_struct_static_04_01, cmp_struct_static_06_01): Fix redundant
+	comparisons.
+
 2019-10-10  Tom de Vries  <tdevries@suse.de>
 
 	PR testsuite/24888
diff --git a/gdb/testsuite/gdb.base/infcall-nested-structs.c b/gdb/testsuite/gdb.base/infcall-nested-structs.c
index b6f793e..795ab4a 100644
--- a/gdb/testsuite/gdb.base/infcall-nested-structs.c
+++ b/gdb/testsuite/gdb.base/infcall-nested-structs.c
@@ -141,7 +141,7 @@ int cmp_struct_01_04 (struct struct_01_04 a, struct struct_01_04 b)
 { return a.a == b.a; }
 
 int cmp_struct_02_01 (struct struct_02_01 a, struct struct_02_01 b)
-{ return a.s2.s1.a == b.s2.s1.a && a.s2.s1.b == a.s2.s1.b; }
+{ return a.s2.s1.a == b.s2.s1.a && a.s2.s1.b == b.s2.s1.b; }
 
 int cmp_struct_02_02 (struct struct_02_02 a, struct struct_02_02 b)
 { return a.a == b.a && a.b == b.b; }
@@ -153,8 +153,8 @@ int cmp_struct_02_04 (struct struct_02_04 a, struct struct_02_04 b)
 { return a.a == b.a && a.b == b.b; }
 
 int cmp_struct_04_01 (struct struct_04_01 a, struct struct_04_01 b)
-{ return a.s2.s1.a == b.s2.s1.a && a.s2.s1.b == a.s2.s1.b
-	 && a.s2.s1.c == b.s2.s1.c && a.s2.s1.d == a.s2.s1.d; }
+{ return a.s2.s1.a == b.s2.s1.a && a.s2.s1.b == b.s2.s1.b
+	 && a.s2.s1.c == b.s2.s1.c && a.s2.s1.d == b.s2.s1.d; }
 
 int cmp_struct_04_02 (struct struct_04_02 a, struct struct_04_02 b)
 { return a.a == b.a && a.b == b.b && a.c == b.c && a.d == b.d; }
@@ -167,8 +167,8 @@ int cmp_struct_04_04 (struct struct_04_04 a, struct struct_04_04 b)
 { return a.a == b.a && a.b == b.b && a.c == b.c && a.d == b.d; }
 
 int cmp_struct_05_01 (struct struct_05_01 a, struct struct_05_01 b)
-{ return a.s2.s1.a == b.s2.s1.a && a.s2.s1.b == a.s2.s1.b
-	 && a.s2.s1.c == b.s2.s1.c && a.s2.s1.d == a.s2.s1.d
+{ return a.s2.s1.a == b.s2.s1.a && a.s2.s1.b == b.s2.s1.b
+	 && a.s2.s1.c == b.s2.s1.c && a.s2.s1.d == b.s2.s1.d
 	 && a.s2.s1.e == b.s2.s1.e; }
 
 int cmp_struct_05_02 (struct struct_05_02 a, struct struct_05_02 b)
@@ -187,7 +187,7 @@ int cmp_struct_05_04 (struct struct_05_04 a, struct struct_05_04 b)
 int
 cmp_struct_static_02_01 (struct struct_static_02_01 a,
 			 struct struct_static_02_01 b)
-{ return a.s2.s1.a == b.s2.s1.a && a.s2.s1.b == a.s2.s1.b; }
+{ return a.s2.s1.a == b.s2.s1.a && a.s2.s1.b == b.s2.s1.b; }
 
 int
 cmp_struct_static_02_02 (struct struct_static_02_02 a,
@@ -207,8 +207,8 @@ cmp_struct_static_02_04 (struct struct_static_02_04 a,
 int
 cmp_struct_static_04_01 (struct struct_static_04_01 a,
 			 struct struct_static_04_01 b)
-{ return a.s2.s1.a == b.s2.s1.a && a.s2.s1.b == a.s2.s1.b
-	 && a.s2.s1.c == b.s2.s1.c && a.s2.s1.d == a.s2.s1.d; }
+{ return a.s2.s1.a == b.s2.s1.a && a.s2.s1.b == b.s2.s1.b
+	 && a.s2.s1.c == b.s2.s1.c && a.s2.s1.d == b.s2.s1.d; }
 
 int
 cmp_struct_static_04_02 (struct struct_static_04_02 a,
@@ -229,8 +229,8 @@ cmp_struct_static_04_04 (struct struct_static_04_04 a,
 int
 cmp_struct_static_06_01 (struct struct_static_06_01 a,
 			 struct struct_static_06_01 b)
-{ return a.s2.s1.a == b.s2.s1.a && a.s2.s1.b == a.s2.s1.b
-	 && a.s2.s1.c == b.s2.s1.c && a.s2.s1.d == a.s2.s1.d
+{ return a.s2.s1.a == b.s2.s1.a && a.s2.s1.b == b.s2.s1.b
+	 && a.s2.s1.c == b.s2.s1.c && a.s2.s1.d == b.s2.s1.d
 	 && a.s2.s1.e == b.s2.s1.e && a.f == b.f; }
 
 int


                 reply	other threads:[~2019-10-10 10:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191010102325.112840.qmail@sourceware.org \
    --to=arnez@sourceware.org \
    --cc=gdb-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).