From: Keith Clayton <clay-ton@pacbell.net>
To: Iain Sandoe <iain@sandoe.co.uk>
Cc: linuxppc-dev@lists.linuxppc.org
Subject: Re: Endianness and comparing IP's
Date: Sat, 6 Jan 2001 18:54:00 -0800 [thread overview]
Message-ID: <20010106185400.A17606@yoda> (raw)
In-Reply-To: <20010106234445.44216E690@apollo.valhalla.net>; from iain@sandoe.co.uk on Sat, Jan 06, 2001 at 11:37:24PM +0000
Good catch!
On Sat, Jan 06, 2001 at 11:37:24PM +0000, Iain Sandoe wrote:
>
>
> > /* convert the bytes of a 32-bit integer to little endian */
> > #define BSWAP32(c)
> > ((c>>24)&0xff)|((c>>8)&0xff00)|((c<<8)&0xff0000)|(c<<24)
>
> #define BSWAP32(c) \
> (((c>>24)&0xff)|((c>>8)&0xff00)|((c<<8)&0xff0000)|(c<<24))
>
>
> will work as you expect it too... ;-)
>
> precedence is a funny thing...
>
> Iain.
>
>
--
<><><><><><><><><><><><>
Keith Clayton
clay-ton@pacbell.net
"If you don't trust me with your source code,
why should I trust you with my computer?"
GPG key: http://www.jps.net/kclayton/keith_public_key.html
http://www.keyserver.net
GPG fingerprint: 0C47 F1A1 0434 588C 9457 D53F D86A 5449 43F6 09A0
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~2001-01-07 2:54 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-06 23:37 Endianness and comparing IP's Iain Sandoe
2001-01-07 2:54 ` Keith Clayton [this message]
2001-01-08 7:16 ` Geert Uytterhoeven
2001-01-08 13:20 ` alex avriette
-- strict thread matches above, loose matches on Subject: below --
2001-01-06 23:05 Iain Sandoe
2001-01-06 22:28 Iain Sandoe
2001-01-06 22:39 ` drscholl
2001-01-06 0:22 Iain Sandoe
2001-01-06 22:14 ` drscholl
2001-01-05 23:26 Iain Sandoe
2001-01-05 21:45 Clayton,Keith - Programmer
2001-01-05 21:07 Jerome L Quinn
2001-01-05 20:25 alex avriette
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20010106185400.A17606@yoda \
--to=clay-ton@pacbell.net \
--cc=iain@sandoe.co.uk \
--cc=linuxppc-dev@lists.linuxppc.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).