This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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]

[obv] Fix off-by-one errors in nsintrall.c,et.al.


Hi.

Checked in as obvious.

2009-05-11  Doug Evans  <dje@sebabeach.org>

	* gdb.mi/nsintrall.c (main): Fix off-by-one error.
	* gdb.threads/pending-step.c (main): Fix off-by-one error. 
	* gdb.threads/schedlock.c (main): Fix off-by-one error.

Index: gdb.mi/nsintrall.c
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/nsintrall.c,v
retrieving revision 1.2
diff -u -p -r1.2 nsintrall.c
--- gdb.mi/nsintrall.c	3 Jan 2009 05:58:06 -0000	1.2
+++ gdb.mi/nsintrall.c	11 May 2009 16:19:12 -0000
@@ -35,7 +35,7 @@ int main() {
     for (i = 1; i <= NUM; i++)
       {
 	args[i] = 1;
-	res = pthread_create(&threads[i],
+	res = pthread_create(&threads[i - 1],
 		             NULL,
 			     thread_function,
 			     (void *) i);
Index: gdb.threads/pending-step.c
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.threads/pending-step.c,v
retrieving revision 1.1
diff -u -p -r1.1 pending-step.c
--- gdb.threads/pending-step.c	1 Apr 2009 22:25:44 -0000	1.1
+++ gdb.threads/pending-step.c	11 May 2009 16:19:12 -0000
@@ -34,7 +34,7 @@ int main() {
     for (i = 1; i <= NUM; i++)
       {
 	args[i] = 1;
-	res = pthread_create(&threads[i],
+	res = pthread_create(&threads[i - 1],
 		             NULL,
 			     thread_function,
 			     (void *) i);
Index: gdb.threads/schedlock.c
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.threads/schedlock.c,v
retrieving revision 1.10
diff -u -p -r1.10 schedlock.c
--- gdb.threads/schedlock.c	3 Jan 2009 05:58:07 -0000	1.10
+++ gdb.threads/schedlock.c	11 May 2009 16:19:12 -0000
@@ -35,7 +35,7 @@ int main() {
     for (i = 1; i <= NUM; i++)
       {
 	args[i] = 1;
-	res = pthread_create(&threads[i],
+	res = pthread_create(&threads[i - 1],
 		             NULL,
 			     thread_function,
 			     (void *) i);


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