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]

Fix Hurd build


I've committed this patch from Alfred Szmidt.  Alfred, as you've noticed,
the GNATS database is not a useful way to submit patches; in addition to
being infrequently checked, it mangles unencoded attachments severely.
If you have future bugfixes for the GNU system, might I recommend posting
them to gdb-patches instead?

-- 
Daniel Jacobowitz
CodeSourcery

2006-05-11  Alfred M. Szmidt  <ams@gnu.org>

	* gnu-nat.c (inf_validate_procs): Don't use lvalue in assignments.

Index: gnu-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/gnu-nat.c,v
retrieving revision 1.39
diff -u -p -r1.39 gnu-nat.c
--- gnu-nat.c	24 Jan 2006 22:09:28 -0000	1.39
+++ gnu-nat.c	11 May 2006 19:36:55 -0000
@@ -1050,7 +1050,10 @@ inf_validate_procs (struct inf *inf)
 	    proc_debug (thread, "died!");
 	    thread->port = MACH_PORT_NULL;
 	    thread = _proc_free (thread);	/* THREAD is dead.  */
-	    (last ? last->next : inf->threads) = thread;
+	    if (last)
+	      last->next = thread;
+	    else
+	      inf->threads = thread;
 	  }
       }
 
@@ -1063,7 +1066,10 @@ inf_validate_procs (struct inf *inf)
 	  /* THREADS[I] is a thread we don't know about yet!  */
 	  {
 	    thread = make_proc (inf, threads[i], next_thread_id++);
-	    (last ? last->next : inf->threads) = thread;
+	    if (last)
+	      last->next = thread;
+	    else
+	      inf->threads = thread;
 	    last = thread;
 	    proc_debug (thread, "new thread: %d", threads[i]);
 	    add_thread (pid_to_ptid (thread->tid));	/* Tell GDB's generic thread code.  */


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