From: David Hopwood <david.nospam.hopwood@blueyonder.co.uk>
To: xen-devel@lists.xensource.com
Subject: Re: [PATCH] 1 of 2: default ssid to 0
Date: Sun, 26 Jun 2005 14:55:56 +0100 [thread overview]
Message-ID: <42BEB3EC.8090906@blueyonder.co.uk> (raw)
In-Reply-To: <OF925F6D60.79986553-ON8525702C.0012218A-8525702C.001254CB@us.ibm.com>
Reiner Sailer wrote:
>>From: aq <aquynh@gmail.com>
>>+ for(j=0; j<= CWALL_MAX_SSIDREFS; j++)
>>+ if ((0 < j) &&( j <= CWALL_MAX_TYPES))
>>+ ssidrefs[j*CWALL_MAX_TYPES + j - 1] = htons(1);
>>+
>>
>>why dont you run the loop from j=1?
>
> because row j=0 is the new default ssid and has no types set.
> We start with row j=1 and set the "diagonal" types to one.
I think aq's point was that the above loop is equivalent to:
#include <stdlib.h> // for 'min'
for (j = 1; j <= min(CWALL_MAX_SSIDREFS, CWALL_MAX_TYPES); j++) {
ssidrefs[j*CWALL_MAX_TYPES + j - 1] = htons(1);
}
which is arguably clearer.
--
David Hopwood <david.nospam.hopwood@blueyonder.co.uk>
next prev parent reply other threads:[~2005-06-26 13:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-26 3:20 [PATCH] 1 of 2: default ssid to 0 Reiner Sailer
2005-06-26 10:04 ` aq
2005-06-26 13:55 ` David Hopwood [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-06-25 18:29 Stefan Berger
2005-06-26 0:21 ` Anthony Liguori
2005-06-26 1:39 ` aq
2005-06-26 1:45 ` aq
2005-06-26 1:49 ` Mark Williamson
2005-06-26 2:18 ` aq
2005-06-26 2:24 ` Mark Williamson
2005-06-26 10:07 ` aq
2005-06-26 16:10 ` Stefan Berger
2005-06-26 16:13 ` Keir Fraser
2005-06-26 19:05 ` Chris Wright
2005-06-27 18:10 ` Josh Triplett
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=42BEB3EC.8090906@blueyonder.co.uk \
--to=david.nospam.hopwood@blueyonder.co.uk \
--cc=xen-devel@lists.xensource.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.