Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Nov 2010 10:48:09 -0800
From:      Artem Belevich <fbsdlist@src.cx>
To:        Alexander Best <arundel@freebsd.org>
Cc:        Bruce Cran <bruce@cran.org.uk>, freebsd-hackers@freebsd.org
Subject:   Re: Logical vs. bitwise AND in sbin/routed/parms.c
Message-ID:  <AANLkTi=GDDjLTCeVV-h9Y0a4vrkP0suk5fdpm9pdUEmP@mail.gmail.com>
In-Reply-To: <20101122183523.GA28412@freebsd.org>
References:  <20101122162712.3c3655fe@core.draftnet> <20101122183523.GA28412@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTi=GDDjLTCeVV-h9Y0a4vrkP0suk5fdpm9pdUEmP>