From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 22 19:11:38 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 915C6106566B; Mon, 22 Nov 2010 19:11:38 +0000 (UTC) (envelope-from artemb@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 302CC8FC19; Mon, 22 Nov 2010 19:11:37 +0000 (UTC) Received: by qwg5 with SMTP id 5so129166qwg.13 for ; Mon, 22 Nov 2010 11:11:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=1O7MddMDrcqzI4gvsejZRTYHw0+uT3cyBKKleQDnb0Y=; b=lDxO0Y2B2IummGJdGZUJWWv1Lh9P7f1e0YglvfNE7OVbdorlDxyjQensELdgcC8JDT FTNP6rdu5kABuzCGHTmsOM1qnuWTLPlJJjrWFPaELJwkzBDnPG9uu+e9PWYOs4FIOVI5 ESn/f2OVku4iBLkTkFooNBsBusoGk+VLokAcQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=i9UUPu6f0eZyFZp31olimROwGKm2L6ag03suUctfABmPHvt9lVxVgL12B6CBOVT2p/ 5J2LSIAsQXz+seL8zt018ZTl16T/lir0HOU6LRSceY9pC0yy2CRKh2lEKB5+hkLOXxCW BZs484EGjJPCangJcsyAa3UFwagDYKnBxTkH4= MIME-Version: 1.0 Received: by 10.224.63.218 with SMTP id c26mr5597874qai.24.1290451689076; Mon, 22 Nov 2010 10:48:09 -0800 (PST) Sender: artemb@gmail.com Received: by 10.220.177.8 with HTTP; Mon, 22 Nov 2010 10:48:09 -0800 (PST) In-Reply-To: <20101122183523.GA28412@freebsd.org> References: <20101122162712.3c3655fe@core.draftnet> <20101122183523.GA28412@freebsd.org> Date: Mon, 22 Nov 2010 10:48:09 -0800 X-Google-Sender-Auth: eV1SJ2bVAoSVURxCHpjryGS_q78 Message-ID: From: Artem Belevich To: Alexander Best Content-Type: text/plain; charset=ISO-8859-1 Cc: Bruce Cran , freebsd-hackers@freebsd.org Subject: Re: Logical vs. bitwise AND in sbin/routed/parms.c X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Nov 2010 19:11:38 -0000 There's another case of '&' used improperly. http://svn.freebsd.org/viewvc/base?view=revision&revision=90385 if (hdr.elf.e_ident[EI_OSABI] & ELFOSABI_FREEBSD) { is_shlib = 1; } else { hdr.elf.e_ident[EI_OSABI] is not a bitmask and '==' should've been used instead. Now ldd.c has two instances of this bug due to copy/pasting of orignal code. --Artem