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

Re: [PATCH 1/4] Fix allocation of "int*" instead of "int".

From
Jeff King <peff@peff.net>
Date
Jul 31, 2007, 19:56 UTC
Message-ID
<20070731195616.GA6329@sigill.intra.peff.net>
In-Reply-To
<20070731144829.ea83d43d.chriscool@tuxfamily.org>
On Tue, Jul 31, 2007 at 02:48:29PM +0200, Christian Couder wrote:
> -	weights = xcalloc(on_list, sizeof(int*));
> +	weights = xcalloc(on_list, sizeof(int));
How about the correct-by-definition sizeof(*weights)?
-Peff
Previous: Christian CouderNext: Christian Couder
Message 2 of 3 in “Fix allocation of "int*" instead of "int".”
  1. 1/4 Fix allocation of "int*" instead of "int".Christian Couder, Jul 31, 2007
  2. Jeff KingJul 31, 2007
  3. Christian CouderAug 1, 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.