2006-05-11 Alfred M. Szmidt <ams@gnu.org>
authorDaniel Jacobowitz <drow@false.org>
Thu, 11 May 2006 19:37:52 +0000 (19:37 +0000)
committerDaniel Jacobowitz <drow@false.org>
Thu, 11 May 2006 19:37:52 +0000 (19:37 +0000)
* gnu-nat.c (inf_validate_procs): Don't use lvalue in assignments.

gdb/ChangeLog
gdb/gnu-nat.c

index 3f4db564b6a63381d4503b7832a6a764b1a72cf6..6842b6b7c3e5d145d7364b5f7d884158ebe212b0 100644 (file)
@@ -1,3 +1,7 @@
+2006-05-11  Alfred M. Szmidt  <ams@gnu.org>
+
+       * gnu-nat.c (inf_validate_procs): Don't use lvalue in assignments.
+
 2006-05-11  Fred Fish  <fnf@specifix.com>
 
        * symtab.c (skip_prologue_using_sal): Handle single line functions
index f17d001bc0ba26efb7f8e8d21d2a44b65c5d26ec..968a9cf5f17abf410191ae6ffced3bffe4cf4346 100644 (file)
@@ -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.  */