git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Fix a comparison bug in diff-delta.c

From
Nicolas Pitre <nico@cam.org>
Date
Aug 23, 2006, 03:17 UTC
Message-ID
<Pine.LNX.4.64.0608222311060.3683@localhost.localdomain>
In-Reply-To
<1156300368160-git-send-email-madcoder@debian.org>
On Wed, 23 Aug 2006, Pierre Habouzit wrote:
> (1 << i) < hspace is compared in the `int` space rather that in the unsigned one.
> the result will be wrong if hspace is between  0x40000000 and 0x80000000.
> 
> Signed-off-by: Pierre Habouzit <madcoder@debian.org>

Could you use (1u << i) instead of (unsigned)(1 << i) ? That looks prettier to me at least.

Nicolas
Previous: Pierre Habouzit
Message 3 of 3 in “Fix a comparison bug in diff-delta.c”
  1. Fix a comparison bug in diff-delta.cPierre Habouzit, Aug 23, 2006
  2. Pierre HabouzitAug 23, 2006
  3. Nicolas PitreAug 23, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.