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

[PATCH 1/1] git: remove redundant getenv() in init-db

From
tony.luck@intel.com <tony.luck@intel.com>
Date
Apr 14, 2005, 18:30 UTC
Message-ID
<200504141830.j3EIUL003768@unix-os.sc.intel.com>
From: Tony Luck <tony.luck@intel.com>
init-db calls getenv(DB_ENVIRONMENT) twice.  Once should be enough.
Signed-off-by: Tony Luck <tony.luck@intel.com>
---
 init-db.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

--- init-db.c +++ init-db.c 2005-04-14 11:01:52.000000000 -0700

@@ -7,7 +7,7 @@
 
 int main(int argc, char **argv)
 {
-	char *sha1_dir = getenv(DB_ENVIRONMENT), *path;
+	char *sha1_dir, *path;
 	int len, i;
 
 	if (mkdir(".git", 0755) < 0) {
Message 1 of 1 in “git: remove redundant getenv() in init-db”
  1. 1/1 git: remove redundant getenv() in init-dbtony.luck@intel.com, Apr 14, 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.