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

Re: [PATCH] use xrealloc in help.c

From
MWMorten Welinder <mwelinder@gmail.com>
Date
Mar 27, 2007, 22:40 UTC
Message-ID
<118833cc0703271540l6615b413gd1df3dc5525a2d00@mail.gmail.com>
In-Reply-To
<1175034608589-git-send-email-jbowes@dangerouslyinc.com>
> -               cmdname = realloc(cmdname, cmdname_alloc * sizeof(*cmdname));
> +               cmdname = xrealloc(cmdname, cmdname_alloc * sizeof(*cmdname));
>                 if (!cmdname)
>                         oom();
If you are using xrealloc, shouldn't kill the oom check here too?
M.
Previous: James BowesNext: James Bowes
Message 2 of 3 in “use xrealloc in help.c”
  1. use xrealloc in help.cJames Bowes, Mar 27, 2007
  2. Morten WelinderMar 27, 2007
  3. James BowesMar 28, 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.