From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50182) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TrCS8-0000H6-9N for qemu-devel@nongnu.org; Fri, 04 Jan 2013 13:57:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TrCS5-0006jM-QF for qemu-devel@nongnu.org; Fri, 04 Jan 2013 13:57:12 -0500 Received: from mail-ie0-f175.google.com ([209.85.223.175]:38262) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TrCS5-0006jG-LS for qemu-devel@nongnu.org; Fri, 04 Jan 2013 13:57:09 -0500 Received: by mail-ie0-f175.google.com with SMTP id qd14so19716495ieb.6 for ; Fri, 04 Jan 2013 10:57:09 -0800 (PST) Sender: Richard Henderson Message-ID: <50E72603.5080607@twiddle.net> Date: Fri, 04 Jan 2013 10:57:07 -0800 From: Richard Henderson MIME-Version: 1.0 References: <1357207368-21116-1-git-send-email-nickolai@csail.mit.edu> In-Reply-To: <1357207368-21116-1-git-send-email-nickolai@csail.mit.edu> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] linux-user/syscall.c: fix copy_to_user_fdset for fds over 30 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Nickolai Zeldovich Cc: Riku Voipio , qemu-devel@nongnu.org On 01/03/2013 02:02 AM, Nickolai Zeldovich wrote: > - v |= ((FD_ISSET(k, fds) != 0) << j); > + v |= (((abi_ulong) (FD_ISSET(k, fds) != 0)) << j); It would be easier to read if you dropped the unnecessary parens. v |= (abi_ulong)(FD_ISSET(k, fds) != 0) << j; Otherwise the change looks correct. r~