From: "David S. Miller" <davem@davemloft.net>
To: arjan@infradead.org
Cc: drepper@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: ntohs/ntohl and bitops
Date: Wed, 11 Jan 2006 00:36:08 -0800 (PST) [thread overview]
Message-ID: <20060111.003608.126208924.davem@davemloft.net> (raw)
In-Reply-To: <1136967192.2929.6.camel@laptopd505.fenrus.org>
From: Arjan van de Ven <arjan@infradead.org>
Date: Wed, 11 Jan 2006 09:13:11 +0100
> > The first suggestion isn't considered ugly, and the best form is:
> >
> > if (ih->frag_off & __constant_htons(IP_OFFSET))
>
> why this __constant_htons and not just plain htons ??
> htons() gets auto-remapped to that anyway via the builtin "is this a
> constant" thing...... and to be honest htons() is more readable.
You're right.
We use the __constant_*() things for structure initialization
which needs to be compile time.
next prev parent reply other threads:[~2006-01-11 8:36 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-10 22:02 Ulrich Drepper
2006-01-11 8:00 ` David S. Miller
2006-01-11 8:13 ` Arjan van de Ven
2006-01-11 8:36 ` David S. Miller [this message]
2006-01-11 8:36 ` Ulrich Drepper
2006-01-11 8:44 ` David S. Miller
2006-01-11 9:48 ` Jakub Jelinek
2006-01-11 18:35 ` Jan Engelhardt
2006-01-11 18:45 ` Ulrich Drepper
2006-01-11 20:19 ` David S. Miller
2006-01-12 1:04 ` Pavel Machek
2006-01-14 9:52 ` YOSHIFUJI Hideaki / 吉藤英明
2006-01-15 1:46 ` David S. Miller
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=20060111.003608.126208924.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=arjan@infradead.org \
--cc=drepper@redhat.com \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®