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

[PATCH] git-tar-tree: cleanup write_trailer() (resent)

From
Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Date
Jun 2, 2005, 18:50 UTC
Message-ID
<20050602185048.GA3726@lsrfire.ath.cx>
git-tar-tree: replace open-coded variants of get_record().
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
diff --git a/tar-tree.c b/tar-tree.c
--- a/tar-tree.c
+++ b/tar-tree.c
@@ -73,16 +73,13 @@ static char *get_record(void)
  */
 static void write_trailer(void)
 {
-	memset(block + offset, 0, RECORDSIZE);
-	offset += RECORDSIZE;
+	get_record();
 	write_if_needed();
-	memset(block + offset, 0, RECORDSIZE);
-	offset += RECORDSIZE;
+	get_record();
 	write_if_needed();
 	if (offset) {
-		memset(block + offset, 0, BLOCKSIZE - offset);
-		reliable_write(block, BLOCKSIZE);
-		offset = 0;
+		get_record();
+		write_if_needed();
 	}
 }
 
Message 1 of 1 in “git-tar-tree: cleanup write_trailer() (resent)”
  1. git-tar-tree: cleanup write_trailer() (resent)Rene Scharfe, Jun 2, 2005

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.