From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10936 invoked by alias); 11 May 2006 19:39:30 -0000 Received: (qmail 10887 invoked by uid 22791); 11 May 2006 19:39:29 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Thu, 11 May 2006 19:39:27 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1FeH0P-0003yG-GM; Thu, 11 May 2006 15:39:25 -0400 Date: Thu, 11 May 2006 19:39:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sourceware.org Cc: ams@gnu.org Subject: Fix Hurd build Message-ID: <20060511193925.GA15208@nevyn.them.org> Mail-Followup-To: gdb-patches@sourceware.org, ams@gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.8i X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-05/txt/msg00222.txt.bz2 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 * 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. */