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

[PATCH] read-tree: use xcalloc

From
James Bowes <jbowes@dangerouslyinc.com>
Date
Mar 27, 2007, 22:30 UTC
Message-ID
<11750346193538-git-send-email-jbowes@dangerouslyinc.com>
Signed-off-by: James Bowes <jbowes@dangerouslyinc.com>
---
This is the last 'replace blah with xblah' patch I'll send, honest.
 builtin-read-tree.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/builtin-read-tree.c b/builtin-read-tree.c
index 82df941..793eae0 100644
--- a/builtin-read-tree.c
+++ b/builtin-read-tree.c
@@ -184,7 +184,7 @@ int cmd_read_tree(int argc, const char **argv, const char *unused_prefix)
 			if (opts.dir)
 				die("more than one --exclude-per-directory are given.");
 
-			dir = calloc(1, sizeof(*opts.dir));
+			dir = xcalloc(1, sizeof(*opts.dir));
 			dir->show_ignored = 1;
 			dir->exclude_per_dir = arg + 24;
 			opts.dir = dir;
-- 
1.5.0.5
Message 1 of 1 in “read-tree: use xcalloc”
  1. read-tree: use xcallocJames Bowes, Mar 27, 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.