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

realloc

From
MWMorten Welinder <mwelinder@gmail.com>
Date
Apr 7, 2006, 20:11 UTC
Message-ID
<118833cc0604071311v1da93f83n112cc2ea44552ca9@mail.gmail.com>
I could be wrong, but shouldn't
      var = realloc (var, whatever);

be changed to call xrealloc? That, or assign to a different variable and check for NULL.

This should affect the last four hits below.
M.

/scratch/welinder/git> grep -w realloc *.c daemon.c: newlist = realloc(socklist, sizeof(int) * (socknum + 1)); diff-delta.c: out = realloc(out, outsize); git.c: cmdname = realloc(cmdname, cmdname_alloc * sizeof(*cmdname)); ls-files.c: which->excludes = realloc(which->excludes, sha1_file.c: buf = realloc(buf, size);

Next: Junio C Hamano
Message 1 of 2 in “realloc”
  1. Morten WelinderApr 7, 2006
  2. Junio C HamanoApr 7, 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.