From: David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
To: David.Laight-ZS65k/vG3HxXrIkS9f7CXA@public.gmane.org
Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH 03/15] batman-adv: add biggest_unsigned_int(x) macro
Date: Wed, 25 Apr 2012 14:09:04 -0400 (EDT) [thread overview]
Message-ID: <20120425.140904.935584797119761625.davem@davemloft.net> (raw)
In-Reply-To: <AE90C24D6B3A694183C094C60CF0A2F6026B6EF4-CgBM+Bx2aUAnGFn1LkZF6NBPR1lH4CV8@public.gmane.org>
From: "David Laight" <David.Laight-ZS65k/vG3HxXrIkS9f7CXA@public.gmane.org>
Date: Wed, 25 Apr 2012 15:57:39 +0100
>
>> > +/* Returns the biggest unsigned integer with the sizeof x */
>> > +#define biggest_unsigned_int(x) (~(x)0)
>>
>> Nope - biggest_unsigned_int(unsigned char) is probably 0xffffffff
>
> To correct myself, it is actually ((int)(-1)) (ie a signed value).
In any event this is just a terrible macro, and too stupid to live.
next prev parent reply other threads:[~2012-04-25 18:09 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-25 13:26 pull request: batman-adv 2012-04-25 Antonio Quartulli
[not found] ` <1335360431-30027-1-git-send-email-ordex-GaUfNO9RBHfsrOwW+9ziJQ@public.gmane.org>
2012-04-25 13:26 ` [PATCH 01/15] batman-adv: add UNICAST_4ADDR packet type Antonio Quartulli
2012-04-25 13:26 ` [PATCH 02/15] batman-adv: add a new log level for DAT debugging Antonio Quartulli
2012-04-25 13:26 ` [PATCH 03/15] batman-adv: add biggest_unsigned_int(x) macro Antonio Quartulli
2012-04-25 14:14 ` David Laight
[not found] ` <AE90C24D6B3A694183C094C60CF0A2F6026B6EF3-CgBM+Bx2aUAnGFn1LkZF6NBPR1lH4CV8@public.gmane.org>
2012-04-25 14:57 ` David Laight
[not found] ` <AE90C24D6B3A694183C094C60CF0A2F6026B6EF4-CgBM+Bx2aUAnGFn1LkZF6NBPR1lH4CV8@public.gmane.org>
2012-04-25 18:09 ` David Miller [this message]
[not found] ` <20120425.140904.935584797119761625.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2012-04-27 12:51 ` Antonio Quartulli
2012-04-25 13:27 ` [PATCH 04/15] batman-adv: Distributed ARP Table - create DHT helper functions Antonio Quartulli
2012-04-25 13:27 ` [PATCH 05/15] batman-adv: Distributed ARP Table - add ARP parsing functions Antonio Quartulli
2012-04-25 13:27 ` [PATCH 06/15] batman-adv: Distributed ARP Table - add snooping functions for ARP messages Antonio Quartulli
2012-04-25 13:27 ` [PATCH 07/15] batman-adv: Distributed ARP Table - increase default soft_iface ARP table timeout Antonio Quartulli
2012-04-25 13:27 ` [PATCH 08/15] batman-adv: Distributed ARP Table - add compile option Antonio Quartulli
2012-04-25 13:27 ` [PATCH 09/15] batman-adv: fix wrong dhcp option list browsing Antonio Quartulli
2012-04-25 13:27 ` [PATCH 10/15] batman-adv: introduce is_single_hop_neigh variable to increase readability Antonio Quartulli
2012-04-25 13:27 ` [PATCH 11/15] batman-adv: introduce packet type handler array for incoming packets Antonio Quartulli
2012-04-25 13:27 ` [PATCH 12/15] batman-adv: register batman ogm receive function during protocol init Antonio Quartulli
2012-04-25 13:27 ` [PATCH 13/15] batman-adv: rename last_valid to last_seen Antonio Quartulli
2012-04-25 13:27 ` [PATCH 14/15] batman-adv: replace HZ calculations with jiffies_to_msecs() Antonio Quartulli
2012-04-25 13:27 ` [PATCH 15/15] batman-adv: split neigh_new function into generic and batman iv specific parts Antonio Quartulli
-- strict thread matches above, loose matches on Subject: below --
2012-04-29 8:57 pull request: batman-adv 2012-04-29 Antonio Quartulli
[not found] ` <1335689867-8017-1-git-send-email-ordex-GaUfNO9RBHfsrOwW+9ziJQ@public.gmane.org>
2012-04-29 8:57 ` [PATCH 03/15] batman-adv: add biggest_unsigned_int(x) macro Antonio Quartulli
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=20120425.140904.935584797119761625.davem@davemloft.net \
--to=davem-ft/pcqaiutieiz0/mpfg9q@public.gmane.org \
--cc=David.Laight-ZS65k/vG3HxXrIkS9f7CXA@public.gmane.org \
--cc=b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.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).