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

Re: [PATCH 2/2] Correct some sizeof(size_t) != sizeof(unsigned long) typing errors

From
Shawn O. Pearce <spearce@spearce.org>
Date
Oct 22, 2007, 04:00 UTC
Message-ID
<20071022040010.GH14735@spearce.org>
In-Reply-To
<20071021103132.GA25741@artemis.corp>
Pierre Habouzit <madcoder@debian.org> wrote:
Show 18 quoted lines
> On Sun, Oct 21, 2007 at 09:23:49AM +0000, René Scharfe wrote:
> > > Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
> > > ---
> > >  builtin-apply.c   |    2 +-
> > >  builtin-archive.c |    2 +-
> > >  diff.c            |    4 ++--
> > >  entry.c           |    2 +-
> > >  strbuf.h          |    8 +++++++-
> > >  test-delta.c      |    3 ++-
> > >  6 files changed, 14 insertions(+), 7 deletions(-)
> > 
> > I have a feeling this is going in then wrong direction.  Shouldn't
> > we rather use size_t everywhere?  malloc() takes a size_t, and it's
> > the basis of strbuf and also of the file content functions.
> 
>   I agree, Junio was working on a patch that generalized use of size_t's
> when unsigned long where used and size_t meant, I suppose he didn't had
> the time to push it.

Yea, you guys convinced me to go with René's patch. I'm replacing mine and will put it into next tonight.

I actually had started with what René wrote but changed it to what you saw before posting it to the list. :-)

-- 
Shawn.
Previous: Pierre Habouzit
Message 4 of 4 in “Correct some sizeof(size_t) != sizeof(unsigned long) typing errors”
  1. 2/2 Correct some sizeof(size_t) != sizeof(unsigned long) typing errorsShawn O. Pearce, Oct 21, 2007
  2. René ScharfeOct 21, 2007
  3. Pierre HabouzitOct 21, 2007
  4. Shawn O. PearceOct 22, 2007

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.