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

[PATCH 3/7] Ensure packed_git.next is initialized to NULL.

From
Shawn O. Pearce <spearce@spearce.org>
Date
Dec 24, 2006, 05:46 UTC
Message-ID
<20061224054604.GC8146@spearce.org>
In-Reply-To
<487c7d0ea81f2f82f330e277e0aea38a66ca7cfe.1166939109.git.spearce@spearce.org>

Junio noticed while reviewing this patch series that I removed the initialization of packed_git.next = NULL in 88078baa. That removal was not intended so I'm restoring the initialization where necessary.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
---
 sha1_file.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/sha1_file.c b/sha1_file.c
index 1a87f95..8de8ce0 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -676,6 +676,7 @@ struct packed_git *add_packed_git(char *path, int path_len, int local)
 	p->index_size = idx_size;
 	p->pack_size = st.st_size;
 	p->index_base = idx_map;
+	p->next = NULL;
 	p->windows = NULL;
 	p->pack_fd = -1;
 	p->pack_local = local;
@@ -707,6 +708,7 @@ struct packed_git *parse_pack_index_file(const unsigned char *sha1, char *idx_pa
 	p->index_size = idx_size;
 	p->pack_size = 0;
 	p->index_base = idx_map;
+	p->next = NULL;
 	p->windows = NULL;
 	p->pack_fd = -1;
 	hashcpy(p->sha1, sha1);
-- 
1.4.4.3.g2e63
Previous: Linus TorvaldsNext: Shawn O. Pearce
Message 6 of 13 in “Switch git_mmap to use pread.”
  1. 2/7 Switch git_mmap to use pread.Shawn O. Pearce, Dec 24, 2006
  2. Johannes SchindelinDec 24, 2006
  3. Alon ZivDec 24, 2006
  4. Shawn PearceDec 24, 2006
  5. Linus TorvaldsDec 24, 2006
  6. 3/7 Ensure packed_git.next is initialized to NULL.Shawn O. Pearce, Dec 24, 2006
  7. 4/7 Default core.packdGitWindowSize to 1 MiB if NO_MMAP.Shawn O. Pearce, Dec 24, 2006
  8. 5/7 Don't exit successfully on EPIPE in read_or_die.Shawn O. Pearce, Dec 24, 2006
  9. 6/7 Release pack windows before reporting out of memory.Shawn O. Pearce, Dec 24, 2006
  10. Johannes SchindelinDec 24, 2006
  11. 7/7 Replace mmap with xmmap, better handling MAP_FAILED.Shawn O. Pearce, Dec 24, 2006
  12. Johannes SchindelinDec 24, 2006
  13. Shawn PearceDec 24, 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.