linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Evgeniy Polyakov <zbr@ioremap.net>
To: rikmorgandev@gmail.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: POHMELFS is back
Date: Tue, 20 Sep 2011 21:47:57 +0400	[thread overview]
Message-ID: <20110920174757.GA1330@ioremap.net> (raw)
In-Reply-To: <4E78C7CD.3030401@gmail.com>

On Tue, Sep 20, 2011 at 11:05:17AM -0600, Rick Morgan (rikmorgan@gmail.com) wrote:
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

Please do not use inline html

>   <pre wrap="">+static inline int dnet_id_cmp_str(const unsigned char *id1, const unsigned char *id2)
> +{
> +	unsigned int <b>i = 0</b>;
> +
> +	for (<b>i*=sizeof</b>(unsigned long); i&lt;DNET_ID_SIZE; ++i) {
> +		if (id1[i] &lt; id2[i])
> +			return -1;
> +		if (id1[i] &gt; id2[i])
> +			return 1;
> +	}
> +
> +	return 0;
> +}
>   </pre>
> </blockquote>
> if i is initialized to 0, wouldn't i*=sizeof(unsigned long) be zero?<br>

Yes, it counts from zero. This chunk previously checked another
parameter first, but since then it was removed, but checking loop
remained.

-- 
	Evgeniy Polyakov

      parent reply	other threads:[~2011-09-20 17:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-19  6:13 POHMELFS is back Evgeniy Polyakov
2011-09-19 18:10 ` Valdis.Kletnieks
2011-09-20  5:58   ` Evgeniy Polyakov
2011-09-20 13:41     ` Valdis.Kletnieks
2011-09-20 14:18       ` Evgeniy Polyakov
2011-09-20  6:07   ` Evgeniy Polyakov
     [not found] ` <4E78C7CD.3030401@gmail.com>
2011-09-20 17:47   ` Evgeniy Polyakov [this message]

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=20110920174757.GA1330@ioremap.net \
    --to=zbr@ioremap.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rikmorgandev@gmail.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 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).